Forums

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

Jira Automation Dropdown list

Kasper Ramstafer February 13, 2023

In my project I've created a rule that creates a new issue when a specific task is done.  I have a custom dropdown list field that I want to automatically update with the next item in the list.  For example, the dropdown list is cycle 1, cycle 2, cycle 3, cycle 4, etc.  If my task is moved to done and the dropdown field is cycle 1. I want the new task that's created to now use cycle 2 in the dropdown field. When that task is marked done I want the new task to have cycle 3 in the dropdown field. Is that possible?  

1 answer

1 accepted

1 vote
Answer accepted
Stefan Salzl
Community Champion
February 13, 2023

Hi @Kasper Ramstafer 

Technically this is possible. You would just have to define when the process should stop (in regard of "how many drop down options" do you have and at which point/option the rule should not trigger anymore).

Each drop down option has an ID. You could increment that option from your triggerIssue´s option id and set this one to the newly created issue.

 

So this is how your rule could look like:

  • Trigger: 
    • Issue transitioned to Done
  • action:
    • edit issue
      • use advanced json option to edit your dropdown via ID:
        • {

          "fields": {

          "Stage": {

          "id": "{{triggerIssue.<your_customfield>.id.plus(1)}}"

          }

          }

          }

In my case I just tested the increment and the setting via ID (without the trigger and a newly created issue therefore the hint to use the smart vale triggerIssue).

My rule looks as follows:

image.png

Hope this was helpful.

Best
Stefan

Suggest an answer

Log in or Sign up to answer