Opened 2 years ago

Closed 22 months ago

#1399 closed enhancement (fixed)

The Release importer should handle null values for annotations

Reported by: Nicklas Nordborg Owned by:
Priority: major Milestone: Relax v1.7
Component: net.sf.basedb.relax Keywords:
Cc:

Description (last modified by Nicklas Nordborg)

The issue we need to solve is a case where INCA annotations have had a value in one release but it has been removed in an update. In the current situation it means that the original value may exists on Relax as a default value and it will be used also for the new release.

This change also need a corresponding change in the Release exporter in the Reggie plugin. See ticket #1398. When a null value is present in the JSON, the importer may need to take some actions:

  • If the current item has a default value for the annotation, the default value should be removed.
  • The default value should be copied to project-specific annotations. One for each release that the item (and annotation type) is part of.
  • If the item doesn't have a default value, nothing should be done.
  • Already existing project-specific values should not be modified.

For example:

  • Item A is part of release 1.0, 1.1 and 2.0.
  • It has a default annotation value: foo=bar
  • In release 3.0 the value has been removed.
  • The default value is removed and three new project-specific values for 1.0, 1.1 and 2.0 is created: foo=bar.
  • Item B is part of release 1.0, 1.1 and 2.0
  • It has a default value: foo=bar and a project-specific values for 1.1 and 2.0: foo=bar2.
  • In release 3.0 the value has been removed.
  • The default value is removed and one new project-specific value for 1.0 is created: foo=bar. The project-specific values for 1.1 and 2.0 are not modified.

Change History (6)

comment:1 by Nicklas Nordborg, 2 years ago

Description: modified (diff)

comment:2 by Nicklas Nordborg, 2 years ago

Milestone: Relax v1.xRelax v1.7

comment:3 by Nicklas Nordborg, 2 years ago

In 6784:

References #1399: The Release importer should handle null values for annotations

I think this should work now.

comment:4 by Nicklas Nordborg, 22 months ago

In 7012:

References #1399: The Release importer should handle null values for annotations

Fixes an issue with creating new annotation types during the import if the annotation type is used by more than one type of item. Before the fix the code created duplicate new annotation types with the same name, but only the last one created was used later during the import causing an exception.

comment:5 by Nicklas Nordborg, 22 months ago

In 7021:

References #1399: The Release importer should handle null values for annotations

Added a missing ')'.

comment:6 by Nicklas Nordborg, 22 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.