Forums

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

Prevent Parent Ticket From Being Closed When Linked Tickets are Still Open?

Kirby Knight
Contributor
April 24, 2019

I've searched and haven't found this exact question. I know there are plugins to do this, but I wondered if there's a built-in way to do this in JSD.

We have a lot of scenarios when there's a parent ticket with multiple linked tickets that are set to block the parent ticket. I know the blocking designations are more informational than anything else, but I was wondering if there's a way (without buying a plugin) to prevent the parent (blocked) ticket from being closed when any of the linked tickets are still open.

I was wondering about workflow validation, but I'm not sure I really understand it enough to get started.

Thanks in advance.

1 answer

0 votes
Alexey Matveev
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.
April 24, 2019

Hello,

There are multiple applications available: Power Scripts, ScriptRunner, MyGroovy, Groovioli

If you want to use the Power Scripts add-on, then you could write a validator for the required transition with a code like this:

string errorMsg = "You can not close the issue";

string[] statuses = {"Resolved", "Closed"};

string[] blockingIssues = linkedIssues(key, "Blocks");

for(string issue in blockingIssues) {    

  if(!elementExists(statuses, %issue%.status)) {

       return false, errorMsg;    

  }

}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events