Possible to take actions on the "edit" of a field?

Sandra Meessen May 1, 2018

Hello, we have following situation: when custom field A changes from value X to Y (issue being and staying in workflow status Z), several actions have to be taken. My solution would be to make a workflow transition from status Z to status Z with validation that field A has to change and in post function setting the necessary other custom fields (actions).

Now I get the question if it is possible to take those actions without creating an extra transition, being the trigger the editing of field A in the view or edit screen. As far as I know, this is not possible, or is it? And how than?

Thank you for your help.

2 answers

1 accepted

0 votes
Answer accepted
Mitchell Davison [EY] May 1, 2018

Hi Sandra,

You could setup a Listener that looks for the specific field that you’re interested in changing and then triggers the desired actions as a result of that. If you’re using ScriptRunner this is documented here:

https://scriptrunner.adaptavist.com/latest/jira/listeners.html

Sandra Meessen May 1, 2018

Hello Mitchell,

I found out how to create a listener for the event customfieldupdatedevent. My actions to be taken are, setting 3 other custom fields:

  • fieldA = "Yes'
  • fieldB and fieldC = "To Do".

Which code do I need to get this done in my Listener?

Thank you for your help.

0 votes
Sandra Meessen May 3, 2018

Anyone any concrete suggestions for me? I have fieldA and when this changes value (via edit or view mode in the issue), I need to set 3 custom fields: 

  • fieldA = "Yes'
  • fieldB and fieldC = "To Do"

So, my solution would be: a custom listener on field A for event "customfieldupdatedevent".

What will my code be to set those 3 custom fields and how do I connect the listener to the fieldA? Thanks for the help.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events