We're updating the issue view to help you get more done. 

Deleting list items used in list attributes leaves undisplay-able values


Currently when deleting a list item, attributes that reference it are not deleted. Because the list item is soft deleted and remains in the database this doesn't create and referential issues – the list item is still there, hidden.

For metadata elements with restrictions on repeats this can cause problems. While the values with deleted list items are not visible (good) they are still present and taken into account when calculating the number of existing values. If, for example, you have an element that can only be set once (non-repeating), and the one value happens to be a deleted list item, you are effectively unable to set a visible value. The invisible one can't be deleted and you can't add a visible one because of the repeat limit.

One solution would be to not take deleted list item references into account when calculating the number of values in an element. This is problematic, however, if the list item is undeleted as you can end up with a situation where repeat limits are violated as previously deleted value wink back into existence.

The proposed solution is to simply remove hard delete all attribute values that reference the list item on delete. This can be done efficiently using a single query. While it is rather final, it deals cleanly with the count issues.

It should also allow remapping of attributes from one list item to another.




User known


User known




Fix versions

Affects versions