Forums

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

Jira Insight script assign multiple values

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.
September 13, 2018

Hi all,

I have bug when I assigning a Insight Custom Field value to another custom field.

In a first Jira ticket, I assign a Insight object to a Insight custom field. Then I create via script another ticket, and populate my Insight Object to the other ticket.
Here, all seems good, but When I want to assign the value of this Insight Custom field to another custom field (not insight type), it returns me a set of values :

I use :

CustomField insightCustomField = ComponentAccessor.getCustomFieldManager().getCustomFieldObject(customFieldInsightID);
CustomField topopulate = ComponentAccessor.getCustomFieldManager().getCustomFieldObject(xxx);

 

issue.setCustomFieldValue(topopulate , insightCustomField)

In this case, the result in custom field is a comma separated list of values (and index 0 is not always the real value of insight custom field.

An idea ?

 

thanks in advance.
Regards

1 answer

0 votes
Gezim Shehu [Communardo]
Community Champion
September 13, 2018 edited

How do you want to filter it? By attribute (Object Name)?

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.
September 14, 2018

Hi Gezim,

I found why, it's because I use findObjectsByIQLAndSchema function instead of findObjects.

Now, it's ok, except when the function returns only one value..

thanks

Gezim Shehu [Communardo]
Community Champion
September 14, 2018

Great

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira product discovery, product operations, product ops, linkedin live, atlassian events, cross-functional collaboration, product management, engineering collaboration, design collaboration, atlassian learning, agile teams, product strategy

Product Ops Unpacked: 4️⃣ tips every product pro needs to know ✍️

Join PM Evangelist, Axel Sooriah, & Product Ops. Consultant & Advisor, Jenny Wanger, as they unpack the role of product ops and discuss key takeaways in Atlassian’s ‘The Product Ops Mission’ guide. They’ll answer your questions live on May 6 at 9:00am PT.

Register here ⬇️
AUG Leaders

Atlassian Community Events