Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Listener event to transition an issue when all fields are filled out in a certain state not working? Edited

I'm trying to transition an issue through the workflow automatically using a 'Fast-track transition an issue' in Jira 8. I have scriptrunner, and what I'm trying to do is transition an issue automatically when the date is filled out in my custom field, the Git Hash (also a custom field) is present, and the approvals are either all approved, or Not Required. The approvals are all buttons that fill in a list field. All of these are custom fields. (Changed the names of the custom fields but that shouldn't matter) This will only happen for the one transition from the Review state for the issueType 'My Product'. I'm using the Issue Updated event (which from some googling I thought was the correct one). But for some reason This is still not working. Any idea what I'm doing wrong?

 

Event: Issue Updated

 

Condition:

issue.issueType.name == 'My Product' && \
issue.status.name == 'Review' && \
cfValues['Group1 Approval'] in ['Approved', 'Not Required'] && \
cfValues['Group2 Approval'] in ['Approved', 'Not Required'] && \
cfValues['Group3 Approval'] in ['Approved', 'Not Required'] && \
cfValues['My Date'] && cfValues['Git Hash']

 

I've also tried a blank Condition statement, which works because then it always evaluates to true, but that circumvents the requirements for it to auto-transition (so that's not a solution).  I also tried turning this all into an if-statement comparing the cfValues directly using == instead, and adding the Event: All Issue Events, and Generic Events. But that doesn't work either. I'm kind of at a loss at to why everything is evaluating to false. Hopefully someone can shed some light on what I'm doing wrong.

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you