Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a way to convert the Organizations field values in an array value

Odimar Tomazeli September 11, 2023

Is there a way to convert the Organizations field values in an array value so I can stored in a label field to be displayed in a Jira Software Field as right now Organization is not available in Jira Software

Thank you!

3 answers

0 votes
Odimar Tomazeli September 14, 2023

Hi Dan,
Well as you know on the Organizations field in JSM you can have the original organization that initiated the issue but you can also use that field to add other organizations that are having the same issue so you can end up having something like Org1 Org2 Org5 I want to have this information attached on the JS as well because our developers might need to address customer specific rules

My idea was to create a custom field Organization(s) notice that the difference is the s in parenthesis field is of type Labels so you can add one or more, making this field part of JS and JSM I can assigned it as a hidden field and then use Automation to update the Organization(s) every time Organizations changes. then on the moment the JS ticket is create I can only copy the field Organization(s) from JSM to same field in JS to simplify and to same automation interactions because having the field change rules only for JSM project will not count on the global limit. 

The only part is not working in JSM is to convert Organizations which is of type Organization into Organization(s) type Labels. I have try to do it in the Automation but is not working below is the code i used

{
"fields": {
"customfield_10050": ${issue.get("customfield_10002")*.name.flatten()}
}
}

i have this error
Error while parsing additional fields. Not valid JSON.

0 votes
Dan Breyen
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 11, 2023

Hi Odimar, I'm curious, would it be possible to give some more detail as to how you'd use that field?

When we implemented JSM, I wanted the same thing.  I had a user defined field in Jira called Customer that I wanted to use to store the name of any customer reported tickets.  I decided not to pursue it, 

I'm pretty sure you could use an Automation and the API to pull that information and update Jira, we're doing something similar when we create a ticket to grab the user's Organization and update the ticket.  I figure you could use a similar API to grab the organization and update a field in Jira.  

I ended up deciding we didn't need it, as we link the customer's reported Service Request of the issue to the bug created in JIRA.  Then we have an Automation to update the JSM assignee when the bug is fixed in Jira.

Might not be exactly what you're looking for, but I thought I'd share what we're doing.

Hope that helps.

0 votes
Kristin Lyons
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 11, 2023

There's no way to do that by default but you could create a custom field and then use Automation to copy the Organizations value to the custom field.  Would this work for you?

Odimar Tomazeli September 14, 2023

How? Fields have different types

Kristin Lyons
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 20, 2023

The field type doesn't matter - if you create a short text custom field then it will copy any value from the other field.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events