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

Save a description of maintenance components for use when the referenced components have been deleted #3228

Open
4 tasks done
Tracked by #2243
lunkwill42 opened this issue Nov 21, 2024 · 0 comments · May be fixed by #3231
Open
4 tasks done
Tracked by #2243
Assignees
Labels
enhancement maintenance nav-ref Fronted by the NAV user reference committee

Comments

@lunkwill42
Copy link
Member

lunkwill42 commented Nov 21, 2024

Today, when a netbox (say, with a primary key of 42 and a sysname of example-sw) is added as a maintenance task component, and later the netbox is deleted, the maintenance task will display the component as Netbox: 42 (Component was deleted).

This is intentional, i.e. we want to keep a record of the fact that something was added to a task, even if that something no longer exists in NAV.

However, referring to the netbox as 42 isn't helpful, when all users have known it as example-sw. The netbox record itself is gone, but if the maintenance component itself could record the netbox' sysname when it was added, this could be shown instead.

This is less crucial for locations and rooms, as they do not have opaque integer primary keys in NAV, but string primary keys that are identifiable even after they have been deleted. We might need a description for services, though.

The desired solution

  • Add description varchar field (nullable) to the maint_component table (MaintenanceComponent model).
  • Populate the new description field for all maintenance components that still exist as part of the migration
  • Populate the description field for maintenance components with opaque primary keys as they are added to a maintenance task
  • Update the maintenance task UI to show the description field for components that have been deleted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement maintenance nav-ref Fronted by the NAV user reference committee
Projects
None yet
1 participant