Forums

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

How can I combine two custom fields into one without overriding original value

Joe Red
Contributor
October 3, 2024

I currently have 2 custom fields that one has a typo in that was somehow introduced upon an import it looks like.

Users have been using both fields over time and now I am looking to merge all of them into one of the fields. Script Runner has the a copy script but it overwrites the target with the source value.

I have a sandbox Jira Data Center up and running with the project in question imported into in order to mess around and try to figure this out.

Any help would be awesome.

1 answer

0 votes
Trudy Claspill
Community Champion
October 3, 2024

Hello @Joe Red 

How many issues are you looking to update?

You could use an Automation Rule to iterate through the issues, use a condition to check if the target field is empty, and update it with the data from the source field only in that case.

Are you using Jira Server or Jira Data Center? This would definitely be possible with Jira Data Center.

Jira Administrators can create Automation Rules. They may also allow Project Administrators to create rules that are scoped to only the project they administer.

There may be limits imposed on how many issues can be processed in one run of a rule. I work mostly with Jira Cloud and I know there are limits there. So, depending on how many issues need to be updated you may need to batch the updates so the limits are not exceeded.

Joe Red
Contributor
October 4, 2024

There are A LOT of issues, close to 7K I believe in total. We are using Jira Data Center.

I did try an automation rule, it was the first time using it, but it didn't seem to update anything on the ticket. But I'm not 100% confident of the rule I created and manually kicked off.

Joe Red
Contributor
October 4, 2024

I am also fine with creating a new Text Field-Single Line (which is what the 2 current fields are) and merging the values into that if it is easier.

Trudy Claspill
Community Champion
October 4, 2024

Please provide screen images showing us the rule that you created. I'm not able to suggest why it did not work without that information.

Also please provide screen images showing us the output in the Audit Log from the execution of that rule.

The service limits applied to Automation Rules for Jira Data Center are included in the documentation:

https://confluence.atlassian.com/automation/automation-service-limits-993924705.html

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.12.12
TAGS
AUG Leaders

Atlassian Community Events