Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Script for automatic transition between the statuses of the workflow.

Hi Community,

I'm asking for your help to create a script for Adaptavist ScriptRunner, which will perform the transition of statuses in the workflow. I ask those of you who have experience and knowledge in writing scripts. I'm new to this and don't know how to do it.
I need a script that will perform the transition between statuses in a workflow (it should execute for all projects in Jira). The logic is as follows:

WHEN Comment added -> IF Issue matches Status = "A”; Comment is public; User is an agent; Comment is primary action -> THEN Transition issue “A1”

ELSE IF Issue matches Status = "B”; Comment is public; User is not an agent; Comment is primary action -> THEN Transition issue “B1”

ELSE IF Issue matches Status = "C”; Comment is public; User is an agent; Comment is primary action -> THEN Transition issue “A1”

Maybe some of you already have similar templates. I will appreciate your help very much.

PS. I know that such automation rule can be created with standard Jira tools, but I have a hidden transition in a workflow that can be triggered from other applications (e.g. ScriptRunner).

Condition to transition.jpg

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 18, 2021

Here's how to do a transition in a listener that listens for all comments - https://library.adaptavist.com/entity/transition-an-issue-when-a-tm4j-test-execution-is-updated  - it's for test management and only does one transition, but all you'll need to do is change the logic so that it can trigger A1 or B1 instead conditionally instead of always trigger the same one.

Thank you very much for the link, but when I go to it, I get a 404 error - this page does not exist. Could you please check the correct address?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 20, 2021

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events