Forums

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

ScriptRunner - Set a flag for overdue issues in Server

Pawel June 5, 2022 edited

Hi,

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

How can I do that?

Thanks,

Paul

1 answer

1 accepted

0 votes
Answer accepted
Fazila Ashraf
Community Champion
June 6, 2022

Hello @Pawel 

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 :) 

Pawel June 6, 2022

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.

Thanks,
Paul

Fazila Ashraf
Community Champion
June 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 https://community.atlassian.com/t5/Jira-Software-questions/How-to-flag-an-issue-using-Java-API-scriptrunner-Listener/qaq-p/1324312 for the script

Pawel June 12, 2022

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
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events