Forums

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

Jira Insight Post Function: remove value from insight attribute or set to null

Xavier
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 Leaders.
October 3, 2018

Hi all,

I have a problem when updated Insight Object attribute value with a jira custom field.
When this field is not set, the Insight object attribute get value "null" instead of completely remove the value (issue.getCustomFieldValue(jiraCustomField).toString()) instead of issue.getCustomFieldValue(jiraCustomField)).

I base my script from here: https://documentation.riada.se/display/ICV51/Update+object+attribute#space-menu-link-content.

It works good except when I set an empty value.

Using issue.getCustomFieldValue(jiraCustomField) will give me an error:

Null is not allowed to be added"

 

I didn't see on class ObjectAttributeBeanFactory documentation property or function an equivalent of removeObjectAttributeBean..

How I can delete the value of Insight object attribute when my jira custom field is blank ?

 

Thanks in advance.
regards

2 answers

1 accepted

2 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 Leaders.
October 30, 2018

Hi Xavier.

    Please try the function "deleteObjectAttributeBean()"

Cheers

Yinon

Xavier
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 Leaders.
October 31, 2018

Hi Yinon,

thanks,

0 votes
Xavier
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 Leaders.
October 5, 2018

Hello,

 

no idea ?

regards

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events