Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

ScriptRunner - Set a flag for overdue issues in Server



I'd like to use ScriptRunner's Jobs to set a flag for overdue issues in Server.

How can I do that?



1 answer

1 accepted

0 votes
Answer accepted
Fazila Ashraf Community Leader Jun 06, 2022

Hello @Paul 

By Flag, what do you envision? How are you going to consume that flag?

If it only to query all the overdue issues, cant we query it with JQL itself?

Basically am trying to understand the usecase to give you an appropriate solution :) 

Hi Fazila,

When you right-click on an issue you have an option to "Add flag" which makes the issue's box red-ish.

The point is to have a Job in ScriptRunner running overnight, picking up overdue issues (duedate < startofday()) issues defined by JQL and flagged them.

I'm looking for a ScriptRunner's script to put into SR's Job.


Fazila Ashraf Community Leader Jun 10, 2022

Ah ok.. Got the use case :)

Setting the flag actually sets the value 'Impediment' to the field 'Flagged'.

In you groovy code, you can update the ticket's flagged value to Impediment to achieve this.

Refer to an existing answer for the script

Thanks Fazila,

The link has the code I was looking for.

Like Fazila Ashraf likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

87 views 1 3
Read article

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