Forums

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

Bulk update issues' statuses to Closed

Royce Wong
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 26, 2018

I have a JIRA (server 6.2.2.) instance (couple years old) with lots of projects and different workflows.

I want to bulk close (all our workflows have the status Closed) all the issues that have no update for a period of time.

It seems like the proper way is to follow each workflow and transition the ticket to closed. However, given the number of workflows and different statues the issues could be in, it's not practical.

I would like to automate this bulk update status to Closed tasks, and I am familiar and use Script Runner. Is this possible?

Thanks.

1 answer

0 votes
Tzu Hau Chai
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 26, 2018
Royce Wong
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 27, 2018

JIRA 6.2.2, ScriptRunner 3.0.16.

Thanks. I tried Escalation Service with a User ID that I am sure with enough permissions; Action = None; Additional issue actions set to

issueInputParameters.setSkipScreenCheck(true)
issueInputParameters.setResolutionId('14') //Cancelled
issueInputParameters.setStatusId('6') //Closed

Only some of the issues' resolution got updated; no issue status was changed.
Then I tried:

issueInputParameters.setSkipScreenCheck(true)
transitionOptions.skipConditions(true) //also tried without "true"
transitionOptions.skipPermissions(true) //also tried without "true"
transitionOptions.skipValidators(true) //also tried without "true"
issueInputParameters.setResolutionId('14')
issueInputParameters.setStatusId('6')

but I got this error message:

groovy.lang.MissingPropertyException: No such property: transitionOptions for class: Script112 at Script112.run(Script112.groovy:2)

I am not sure it's issue with ScriptRunner (v 3.0.16) or I am not using transitionOptions correctly. The doc: https://scriptrunner.adaptavist.com/latest/jira/escalation-service.html doesn't explicitly give an example either.

Any assistance is appreciated.

Edited:

Ok, I looked at the doc for older version of ScriptRunner (v 4.0.0): https://scriptrunner.adaptavist.com/4.0.0/jira/escalation-service.html and it has no mention of transitionOptions. Perhaps my version ScriptRunner 3.0.16 doesn't support transitionOptions?

Suggest an answer

Log in or Sign up to answer