Forums

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

Transition only if all the issues (Any issue type) in the current project is Closed

Mohan Sundar
Contributor
November 29, 2021

Hi Community Members,

I hope you are doing well. I'm here with requirement which I couldn't solve it. Reaching out for support.

 

I have a workflow scheme with 15 workflows and it is shared with 250+ projects. 

There is one specific workflow which should not be transitioned to "Closed" status if any issues following the 14 other workflows is not in "Closed" status. They are independent issues and not linked.

In other words, 

Restrict One issue type closure based on all other issue types status.

 

Limitations that I'm facing:

  • If there is a JQL query to check Current Project instead of mentioning the project name then I can write a simple JQL to implement this. But we do not have Current Project function in JQL.
  • The issues are Not Sub-task or linked issues. All are individual issues in the project. If they are linked yes I can put condition/validator based on the issue link/parent-sub-task but here since I need to check the status of all the issues it is complex.

 

I hope to find a solution. 

Thanks in advance for your suggestions.

 

Regards,

Mohana Sundar J. 

1 answer

0 votes
Nic Brough -Adaptavist-
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.
November 30, 2021

I want to paraphrase this to ensure that I have the description correct:

  • The workflow for a given issue should not allow the issue to be closed if there are any open issues in any number of project/issuetype combinations.  

Is that right?

As you have not linked or otherwise indicated that there are blockers to the current issue, the only thing you can possibly search for on the other issues is to name each issuetype and status (although you could maybe use resolution instead if your processes are set to resolve issues when they close)

There is no JQL for "current project" because the search does not have a project context.

If you are ok with a bit of coding though, it is not too hard to get it.  Because your issues are all in the same project, you could simply grab it from the current issue that your condition is checking.  The issue object names the project for the issue, so you could read that and use it in your JQL.

Mohan Sundar
Contributor
December 1, 2021

Hello Nic,

 

Thanks for the reply! Appreciate your time for me.

The requirement is "The workflow for a given issue should not allow the issue to be closed if there are any open issues in Current project which are of different issue types combinations". 

Lets say I have a "Project Closure" issue type which is following Workflow A.

I have 14 other Issue types like "Task" "Bug" "Milestone"..etc which are following different workflows "Workflow B" "Workflow C" "Workflow D" ...etc

 

I already have a custom Scripted Validator set in Create transition of "Project Closure" that this issue type can be created only once per project.

But there are be multiple issues of other issue types which can be created n times.

Now I should not Close the "Project Closure" issue type if any of the other issues are in Open/In-Progress status.

 

All these issues are Independent without any linking between them. They are Not Parent-Child, they are Not Linked issues.

Hoping to hear some more assistance from you! Thank you again :)

 

Best Regards,

Mohana Sundar J

Suggest an answer

Log in or Sign up to answer