-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 5.1.0, 5.2.0, Assets 8.10.15
-
Component/s: Assets - Core experiences
-
12
-
Severity 3 - Minor
-
5
Issue Summary
AS a customer, I may configure an Object Type Attribute, and if no value is saved to the Attribute - I may change the Attribute Type, but settings will not completely follow, leaving artifacts that will affect the Attributes' functionality and visibility.
Steps to Reproduce
- On an Object type, navigate to the Attributes Tab
- add an attribute called Test (leave Type=Default; Type Value=Text) and click Add
- As no value is set into this attribute - change Type from Default to Project
- Create a new object, and set a Project (from dropdown) to the Test Attribute - note the result
- Edit this object by changing the Test Attribute to a different value - note the results
Expected Results
4. The object is showing the selected Project/s in the Attribute
5. The Edit screen shows current value/s, and allows replacing these with a new value/s
Actual Results
4. Object is created successfully, but the Attribute is showing nothing (not the "No Value" seen in List view, if no value was ever set to an attribute
5. If no previous Project value was set to the Test Attribute - the update will succeed, same as 4 above.
If there was a value already saved in Test - an Error banner, will prevent to save the changes.
...2022-12-20 12:49:19,912-0500 http-nio-8080-exec-15 ERROR yinon 769x8129x1 133i8uv 0:0:0:0:0:0:0:1 /rest/insight/1.0/object/1031539 [c.r.j.p.i.services.util.ServiceUtil] RuntimeException:null java.lang.NullPointerException at com.riadalabs.jira.plugins.insight.services.util.ObjectAttributeValueServiceImpl.getValue(ObjectAttributeValueServiceImpl.java:120) at com.riadalabs.jira.plugins.insight.services.util.ObjectAttributeValueService.getValueAsHumanReadable(ObjectAttributeValueService.java:25) at com.riadalabs.jira.plugins.insight.services.util.ObjectAttributeValueServiceImpl.getObjectAttributeValueAsText(ObjectAttributeValueServiceImpl.java:171) at com.riadalabs.jira.plugins.insight.actions.attribute.HistoryServiceImpl.valueAsHistoryText(HistoryServiceImpl.java:134) at com.riadalabs.jira.plugins.insight.actions.attribute.HistoryServiceImpl.lambda$removedValuesAsText$0(HistoryServiceImpl.java:91) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at .... .... 2022-12-20 12:49:19,917-0500 http-nio-8080-exec-15 ERROR yinon 769x8129x1 133i8uv 0:0:0:0:0:0:0:1 /rest/insight/1.0/object/1031539 [c.r.j.p.i.c.w.a.r.exception.mapper.DefaultMapper] Unexpected exception was thrown while processing the request com.riadalabs.jira.plugins.insight.common.exception.RuntimeInsightException: InsightRuntimeException: java.lang.NullPointerException; nested exception is: null java.lang.NullPointerException at com.riadalabs.jira.plugins.insight.services.util.ObjectAttributeValueServiceImpl.getValue(ObjectAttributeValueServiceImpl.java:120) at com.riadalabs.jira.plugins.insight.services.util.ObjectAttributeValueService.getValueAsHumanReadable(ObjectAttributeValueService.java:25) at com.riadalabs.jira.plugins.insight.services.util.ObjectAttributeValueServiceImpl.getObjectAttributeValueAsText(ObjectAttributeValueServiceImpl.java:171) at com.riadalabs.jira.plugins.insight.actions.attribute.HistoryServiceImpl.valueAsHistoryText(HistoryServiceImpl.java:134) at com.riadalabs.jira.plugins.insight.actions.attribute.HistoryServiceImpl.lambda$removedValuesAsText$0(HistoryServiceImpl.java:91) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
Workaround
From the Attributes tab - note the Object Type Attribute Id - the integer to the left of the attribute.
Update the following cell in the DB:
UPDATE "AO_8542F1_IFJ_OBJ_TYPE_ATTR" SET "DEFAULT_TYPE_ID" = '-1' where "ID" = <yourObjectTypeAttributeId>
Run a clean re-index of Assets after the update, and refresh your browser page.
SQL warning:
Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first. Database modifications are not included in Atlassian Support Offerings
- mentioned in
-
Page Loading...