Close Issue using JQL

John Kurre May 1, 2021

Hello,

Does anyone know if an admin can bulk close open issues using JQL? 

issuetype = Bug status = In-Progress assignee = <all below users>

In this hypothetical scenario, there are 5 users who have a minimum of 10 issues assigned to each of them. How does an admin, bulk close using JQL?

  • Jira Software User(1) = 10 issues (In-Progress)
  • Jira Software User(2) = 10 issues (To Do)
  • ... ...
  • Jira Software User(5) = 10 issues (In-Progress)

Note:

I understand the process of closing bulk issues via the Jira interface. This question is for admins who know how to close them using JQL only. 

3 answers

2 accepted

2 votes
Answer accepted
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 2, 2021

Hi @John Kurre  JQL is used to search required issue. With the help of JQL you can search issue which you want to close and do bulk operation, to transition the issues.

yes . You can transition issue using Rest API Post call. Below link helps you to transition issue.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-get

John Kurre May 2, 2021

 that is a great response. Using REST API, I see that one could issue a command to transition issues but the method allows transitioning only from one single issue at a time

{ "id": "<string>", "looped": true }

I will look into it but I believe this is a good primer.

Like Vikrant Yadav likes this
1 vote
Answer accepted
Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 2, 2021

Hi @John Kurre that won’t work. A JQL is just a search query. It will only return issues for you to do something with. 

Just running a JQL and closing the issues  returned will require some action like bulk edit


Well yes you can use the rest api to close issues (transition them to closed) but you’ll always need a minimum of 2 actions 

  • Search the issues using a JQL
  • close the issues

so I fail to see what the advantage would be over using a bulk edit 

John Kurre May 2, 2021

@Dirk Ronsmans Yes you are correct. Indeed, JQL may not be the solution. It could only “Fetch or Get” information in the tables, but it may not be feasible to <:write-jira-work> like REST. With JQL I could only search and bulk edit but I thought there might be another way. Thank you. 

0 votes
John Kurre May 1, 2021

I understand the process of closing bulk issues via the Jira interface. This question is for admins who know how to close them using JQL only. 

Sagar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 1, 2021

Hi @John Kurre You need to construct JQL they way you want to select issues based on the assignee, issue status etc like below  :

issuetype = Bug AND (status = "In Progress" AND assignee = User (1)) OR (status = "To Do" AND assignee = User(2)) OR (status = "In Progress" AND assignee = User(3)) 

This will give the result of all Bug issues for the given assignee based on the status.

Let me know if this helps

John Kurre May 2, 2021

@SagarThanks for the response but I think you may have misconstrued the question. I need JQL to close all issues assigned to any specific user. The issue is not to find issues (Bugs) based on assignee. The goal is to close all issues assigned to any user with JQL alone. 

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 2, 2021

Hi @John Kurre that won’t work. A JQL is just a search query. It will only return issues for you to do something with. 

Just running a JQL and closing the issues  returned will require some action like bulk edit

John Kurre May 2, 2021

@Dirk Ronsmans thank you. How about via REST API? Any thoughts?

Suggest an answer

Log in or Sign up to answer