Forums

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

Text field value should be copied based on resolution values

Asiya fathima March 8, 2023

Hi Team , 

There is a requirement from one of the client that "Catalog" text field value should  be copied  to "Fix catalog" text field when the resolution values are "Fixed", "Done" or else "Fix catalog" field should be empty. Value should copy  even if we provide catalog value in create or edit screen or updated the value after the ticket creation 

3 answers

1 vote
John Funk
Community Champion
March 8, 2023

Hi Asiya - Welcome to the Atlassian Community!

You will need an add-on for that. Something like Automation for Jira or JMWE or ScriptRunner or something like that. Do you have any of those? 

Asiya fathima March 8, 2023

Hi John,

We have both ScriptRunner as well as JMWE. 

Regards,

Asiya

John Funk
Community Champion
March 8, 2023

You should be able to accomplish that then. JMWE will be done using a Post Function on the transition to Done. ScriptRunner would be through a script. Both of those require coding, which is outside of my expertise - but if you have them, I assume someone in your org knows how to use them.   :-)

0 votes
David Fischer
Community Champion
March 8, 2023

Hi @Asiya fathima ,

you can use JMWE for that. However, it really depends on when you want to copy the field value.

If you want to copy the value when the issue is resolved (and thus the Resolution field is set), you need to add a Copy Issue Fields post function to the Resolve transition (or whatever you called the transition where the Resolution is set). On that post function, you'll need to use Conditional Execution to only copy from the Catalog to the Fix Catalog field when Resolution is "Fixed" or "Done". You can use this conditional execution script:

issue.getAsString("resolution") in ["Fixed","Done"]
Asiya fathima March 13, 2023

Hi David, thanks for the response. When i try to edit the catalog field value this is not getting updated and showing the previous value itself for fix catalog in edit screen

David Fischer
Community Champion
March 13, 2023

You mean when you edit the Catalog field outside of the transition screen? That's expected.

To synchronize modifications of the Catalog field to the Fix catalog field, you'd need to use an Event-based Action instead. That event-based action will react to the Issue Field Value Changed Event for the Catalog field, and include the same Copy Issue Fields post function. I would recommend though moving the conditional execution script from the post function to the "scope" of the event-based action, by checking the "Only if condition is true" option and providing the same conditional execution script there:

issue.getAsString("resolution") in ["Fixed","Done"]
0 votes
Alex Koxaras -Relational-
Community Champion
March 8, 2023

Hi @Asiya fathima and welcome to the community,

As John stated, conditional post functions can be found on apps. My cup of tea would be JMWE, but others apps support this functionality as well.

Suggest an answer

Log in or Sign up to answer