When attempting to deactivate an attribute on the object, an error is received:
"System error. Contact system administrator."
When reviewing the app-ca logs an error is seen like:
exceptioncom.niku.union.persistence.PersistenceException: SQL error code: 0Error message: ERROR: more than one row returned by a subquery used as an expressionExecuted: delete from ODF_CA_RDM_ITEM_EVENT where id in ( select id from CMN_EVENT_DATA where EVENT_ID = (select id from ODF_UI_EVENT_DEFINITIONS where REFERENCE_ATTRIBUTE = (select internal_name from ODF_CUSTOM_ATTRIBUTES where id = ?) and REFERENCE_OBJECT = ( select CASE is_abstract WHEN 1 THEN 'inv' ELSE ? END as res from odf_objects where code = ?)))
Any
The attribute is associated to multiple Roadmaps as an "Item Event"
1. First you need to determine which Roadmaps the attributes are associated with. You can use a query like:
select * from ODF_UI_EVENT_DEFINITIONS where REFERENCE_ATTRIBUTE = 'ATTRIBUTE_ID'
(Replace ATTRIBUTE_ID with the Attribute ID value of the attribute you are trying to isolate).
The query will return a list of values, look at the value for associated_instance_id, which will correlate to the internal id of the Roadmap.
2. Access the Roadmap from a browser. For example, if the associated_instance_id were 50000, you can then access the Roadmap by going into a browser and going to:
http://example.com/pm/#/roadmap/50000
3. From the Swimlane view, click the "View Options" button.
4. Access the "Events" and scroll to the bottom and click "Manage Item Events"
5. Find the reference to the attribute you are trying to deactivate, and delete it from the Item Events.
6. After the Roadmaps have been cleaned to remove the attribute, then attempt to deactivate it again.