Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object's creation date inconsistency after db-migration #47

Closed
mzbroch opened this issue May 13, 2021 · 3 comments
Closed

Object's creation date inconsistency after db-migration #47

mzbroch opened this issue May 13, 2021 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mzbroch
Copy link

mzbroch commented May 13, 2021

Environment

nautobot@mia:~$ pip freeze | grep nautobot
nautobot==1.0.1
nautobot-netbox-importer==1.3.0

Expected Behavior

Object's changelog shows consistent created date for imported objects.
From the user perspective, I would like to see following fields :

  • a new entry in the object's Changelog: DB-Migrated indicating object's migration date
  • migrated object inheriting the creation date

Observed Behavior

Object's changelog shows inconsistent created date for imported objects. In the picture below, two different created dates are displayed to the users, which might be confusing:

image

Steps to Reproduce

  1. Import NetBox data with importer including the ChangeLog.
@glennmatthews glennmatthews added enhancement New feature or request help wanted Extra attention is needed labels May 13, 2021
@glennmatthews
Copy link
Contributor

I don't think we'll be able to add a new Action value "DB-Migrated" in this plugin as those are defined in Nautobot's core code. But I could see creating an "Updated" entry matching the migration time. Inheriting the creation date for imported records should be possible as I know we're doing that already for the ObjectChange records.

@jakubkrysl
Copy link

Having the updated entry would also fix switching from IDs to UUID. Now the 1st change after migration had really big difference even though nothing happened. So having "import change" would clear this clutter for future real change. Notice also the created field changed there...
image

@glennmatthews can you please look into it? For us it contains 2 benefits: it prevents future misunderstanding ("Why my simple change is so big, I did not do those things!") and also keeps the creation date of the object, which is a big plus knowing how old they really are. Thank you

glennmatthews added a commit that referenced this issue May 21, 2021
…tency

Issue #47: ChangeLogged objects honour `created` date
@glennmatthews
Copy link
Contributor

Fixed by #49.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants