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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • 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

Custom field value setting using Script Runner based on issue status


We are using JIRA 8.5.1 and we have installed ScriptRunner Add on version

I want to bulk update statuses of number of sub-tasks basis on 2 conditions using ScriptRunner.

If someone can provide me query basis on below criteria that would be helpful. Or how can this be achieved using ScriptRunner. (I am a bit novice on ScriptRunner)

Requirement example: 


Update to new sub-task status of "TYU" for sub-tasks of Current status = abc, xyz and parent task status = MNO, EFG

I have >200 sub-tasks for which this activity is to be done.

1 answer

1 accepted

1 vote
Answer accepted
Ignacio Pulgar Community Leader Feb 06, 2020

Hi @Kaushik ,

If I'm understanding it correctly, the following query would return the subtasks you need to transition:

type = Sub-task AND status in (abc, xyz) AND issueFunction in subtasksOf("type=Task AND status in (MNO, EFG)")

Should you need to include status names with a blankspace, enclose them in single quotes (ie: 'In Progress').

Then, you may transition to the TYU status in one go through a Bulk Change operation (if the transition is available from abc and xyz statuses. Otherwise, it would require two distinct queries, one for each of those statuses).

Hope it helps.

Thank you @Ignacio Pulgar 

This really helped.

Like Ignacio Pulgar likes this

Suggest an answer

Log in or Sign up to answer

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