Skip to content

Allow subsystems to have a different system type to their parent #667

@joelvdavies

Description

@joelvdavies

Feedback from CLF, they would like to be able to have systems that contain systems of different type.

  • When creating systems allow them to have a different type to their parent (remove checks)
  • When updating systems allow them to change their system type regardless of their parents type assuming the system being changed doesnt contain any items
  • Write lock systems when changing their type regardless if the parent id is or will be None (See check in
    # Only need to conflict with a spares update when the type is being changed in a root system (non-root
    # systems are required to have the same type id as their parent anyway)
    or not type_id_changing
    or (system.parent_id is not None if "parent_id" in update_data else stored_system.parent_id is not None)
    the last line needs removing & the comment and tests updated)
    • This will have the consequence that when moving items into a system it will always be write locked until the update has finished instead of only locking it if its at the root level. This will make conflicts more frequent, though the logic to retry in such cases is already in place - permanent solution would still be a queue)

Requires frontend changes too (ral-facilities/inventory-management-system#1637).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions