I use groovy scripts to automate insight object.
How do I set an attribute of type object to nothing/blank?
I tried with that code:
import com.atlassian.jira.component.ComponentAccessor;
def objectFacade = ComponentAccessor.getOSGiComponentInstanceOfType(ComponentAccessor.getPluginAccessor().getClassLoader().findClass("com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectFacade"));
def objectBean = objectFacade.loadObjectBean(object.getId()).createMutable()
def d = objectFacade.deleteObjectAttributeBean(37)
def f = objectFacade.storeObjectBean(objectBean)
There is no error, but the object attribute is not nothing or deleted
Setting the value to "" of the example https://documentation.mindville.com/insight/latest/update-an-object-attribute-33466729.html
produces the error:
2021-01-08 06:05:19,794 [http-nio-8080-exec-12] | Could not update object attribute due to validation exception:ValidationInsightException: Validation errors were found: rlabs-insight-attribute-37: ErrorMessage
{i18nKey='rlabs.insight.i18n.constraint.violation.ObjectAttributeValueBean.MinOne.value', parameters=[], additionalMessage=null}
;