Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Use JIRA automation to split an existing field value and populate other field values from that

Can we use JIRA automation to run on a schedule time and extract/split 2-3 values from an existing JIRA field value and populate other fields based on that may be using javascript?

2 answers

0 votes
Daniel Ebers Community Leader May 23, 2021

Hi @Amit Gandhi

your requirement should be met by the following rule. Please double check if this is what you were looking for.
In case of questions Community is happy to assist.

From your description I seem to have understood the field (here Business Unit) is structured the following, data should be split into BU1, BU2, BU3:


This is the rule which is doing that:


Please note: The Trigger "Issue commented" is just an example, you can choose the trigger that suits the best.

The "Edit issue fields" actions are as follows:










How can we find the exact field name to be used in the script, like Business Unit in below example?

issue.fields.Business Unit.value

Daniel Ebers Community Leader Jun 07, 2021

In case it is a cascading select field you can just use the name, like in my example.
Otherwise or if you want to understand the whole topic better, here is the corresponding documentation:

Like # people like this

Will this work if BU1, BU2 and BU3 are read-only text fields?

I tried with one automation test rule in which the rule ran successfully showing field edited successfully but the field was not updated as expected.


I basically want these fields to be populated/edited through jiira automation ONLY.

Daniel Ebers Community Leader Jun 11, 2021

I cannot imagine it would work when you try to put values into a read-only field.
This would be a bit counter intuitive even from a code's perspective.

While reading your question again I think you might be asking that you want it to have updated/edited by automation but protect it from an user editing it afterwards, manually.

Yes, this should be possible when to take the field away from "edit screen".

0 votes
John Funk Community Leader May 18, 2021

Hi Amit - can you give an exact example? 

Existing field is a two level dropdown list with below values for example:

First dropdown: X

Second dropdown: Y (Z)

That means the field value as a whole is: X - Y (Z)


Now, when I run the JIRA automation rule, it should split the above values into X, Y and Z and populate another three jira fields with these values, like, say,


Field1 with value X

Field2 with value Y

Field3 with value Z

Thanks for the update. 

Take a look at this previous post for some guidance. That should get you Field1 and Field2 but I am not sure how you will get Field3 since it is included in the second half (child value) of the field.

Thanks. However, the requirement is to have Field3 value too as I mentioned.

Is there a way to do that, like, by incorporating a custom javascript code?


Also, Field1, Field2 and Field3 are the real fields in JIRA that need to be populated for the JIRA card/ticket which is being processed, which has the value 'X - Y (Z)' for the target field which is to be extracted.

John Funk Community Leader May 19, 2021

Why don't you just ask for values for all three fields up front instead of only one field and trying to split them up? 

We have already started planning for a better way like that, which can best fit to our system in place at present.

But again, JIRA automation, if possible as asked, can help us move the values from old two level dropdown field to those three new fields, for cards already populated in that way and can continue to use the automation in this way until the new system changes are in place in a full fledged manner.


Regardless, can you please confirm if that use case is possible or not?

John Funk Community Leader May 19, 2021

I would start with moving the values into the first two custom fields first following the guidance above.

Then we can look at how to parse out the values in the second custom field to the third custom field.

I would appreciate your straightforward response on the original ask if it is possible or not. Rest, we will figure out and let you know if your assistance required.


John Funk Community Leader May 21, 2021

As I mentioned in my original response - I don't see how you could populate field 3. Someone else might have that expertise, but I do not. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

Send an Email or Publish to Confluence - What should you do with your release notes?

Background When you hear the words ‘Release notes’, almost always you think of an unsolicited email from a software vendor. But I am here to tell you that from our data, sending release notes via E...

92 views 0 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you