Hello,
I am currently experiencing an issue with my Jira script for updating/changing assets. Below is the code I'm using:
"
def objectType = objectTypeFacade.loadObjectTypeBean(originalObject.getObjectTypeId())
def newObjectBean = objectType.createMutableObjectBean()
newObjectBean.setId(originalObject.getId())
newObjectBean.setObjectAttributeBeans(attributes)
try {
objectFacade.storeObjectBean(newObjectBean)
} catch (Exception e) {
log.info("Error: " + e)
}
"
In one use case, although I receive an error message stating:
"com.riadalabs.jira.plugins.insight.common.exception.RuntimeInsightException: InsightRuntimeException: java.lang.NullPointerException; nested exception is: null"
but the asset is still updated correctly.
However, in another use case, when I encounter the following error:
"com.riadalabs.jira.plugins.insight.common.exception.ValidationInsightException: ValidationInsightException: Validation errors were found: rlabs-insight-attribute-1240: ErrorMessage{i18nKey='rlabs.insight.i18n.constraint.violation.unique', parameters=[uncode], additionalMessage=null};"
the asset fails to update. Using the "objectFacade.storeObjectBeanIgnoreAttributeValidation(newObjectBean)" method allows for a successful update, although it throws the same error as in the first use case.
I have been unable to find a solution for these errors, and I would greatly appreciate any assistance or insights that can be provided.