Forums

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

Use data from one picklist field to populate a different picklist field

Christine Davis
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 28, 2024

I have two types of projects, one uses a customer field name and another uses an organization (custom) field name. They are both picklists. The two fields are the same list of clients we have but their names vary slightly in the different tenants that feed the different projects. I.e customer may be Atlassian and the organization might be Jira Atlassian referring to the same company. 

I want a two-way sync, so if the customer field is blank but the organization field says Jira Atlassian, I want it to populate the customer field with Atlassian. Vice versa, if the organization field is blank and the customer field is Atlassian, I want it to populate the organization field with Jira Atlassian. Is this possible? If the two-way isn't possible, I would be happy to do a one-way from the custom organization field to the standard jira customer field. 

2 answers

0 votes
Trudy Claspill
Community Champion
August 28, 2024

Hello @Christine Davis 

Welcome to the Atlassian community.

Jira would need some sort of table for determining how to map the values.

With an Automation Rule you can define a Lookup Table that specifies a "key" value and the corresponding value for that key. Using such a rule you could construct a table where values for Organization are the keys and another where Customer is the key

key  value 
 Jira Atlassian Atlassian

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-lookup-table

Using such a table you could construct rule(s) that monitor the two fields for change, look at the new value, user the Lookup Table to find what the new value should be for the other field, and update the other field.

 

Do you want the rules to run only when one of the fields is blank and the other has a value?

What if both fields have a value but one of them gets changed?

What if both fields have a value and both get changed, but to values that are not a correct pairing?

0 votes
Shawn Doyle - ReleaseTEAM
Community Champion
August 28, 2024

Hi @Christine Davis 

It's possible. 

There are two main ways to attack this: one with Scriptrunner (and maybe other add-ons as well), and you can script the fields to populate when one is blank and the other isn't. 

The other way is with automation. After the issue is created, if one of the fields is blank, populate it based on the one with a value. The downside of automation is that it happens after the issue is created. This may not be a concern for you.

Both require some scripting.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events