The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

How to delete an insight object attribute value

Janos Laki
March 26, 2019

Can someone suggest how I can use "deleteObjectAttributeBean()" in groovy scripting in order to update/delete an insight object attribute value to null?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
Yinon Negev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 28, 2019

Hi Janos.

      As you rightfully suggested in your support Request with us, I am posting the answer here for the benefit of the community :)

In order to clear an Attribute Value, you have to delete the ObjectAttributeValueBean.

Here is an excerpt of a script doing just that:
// Update End Date obTriage = objectFacade.loadObjectAttributeBean(insightObject.getId(), "End Date").createMutable()
value = obTriage.getObjectAttributeValueBeans()
value.clear() try {
obTriage = objectFacade.deleteObjectAttributeBean(obTriage.id);
} catch (Exception vie)

{ log.error("Could not update object attribute due to validation exception:" + vie.getMessage()); }

}

Kind regards,

Yinon

Team Riada

TAGS
AUG Leaders

Atlassian Community Events