How do I make the issue links keys required and enforce linked issues to be closed?

Dan Sitarski April 16, 2013

I have two issues where I have not been able to figure out how to configure the workflow validator to work with the JIRA workflow toolbox functionally.

1) The issue links field is set to required but it does not enforce any issue keys having to be entered. Even with the issue links field set to required JIRA still allows for an issue to be created even if no keys are entered.

2) Before allowing an issue to be close verify any linked issues for a particular project are closed. We have three projects that we're using and want to make sure any linked issues are closed before allowing the current issue to be closed.

Thank you

3 answers

1 accepted

0 votes
Answer accepted
Fidel Castro
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 18, 2013

Hi Dan,

In case you needed to enforce any linked issue from a specific project to be closed before current issue is closed, leaving linked issues from other projects unaffected by the restriction, you should use the following configuration:

https://groups.google.com/d/msg/jira-workflow-toolbox-plugin/MnfUqjaqYvo/0EeV6ZteGwcJ

Fidel.

1 vote
Fidel Castro
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 17, 2013

Hi Dan,

Question 1: I suppose you are using "Validation on linked issues". In that validator you have a field called "Minimum required number of issue links" with 0 as default value. If you want to enforce at least one issue link you need to set it to 1.

Question 2: If you enforce every linked issue to be closed before an issue is closed you are producing a deadlock, since no issue can be closed because it requires every other linked issue to be closed, and the same happens for linked issues.

Your can avoid this situation restricting that enforcement to a set of issue link types (e.g., "is blocked by" and "depends on").

I show in screenshots how you can do it. You have to enter in transition "Close Issue" a Validation on linked issues using the following configuration:

https://groups.google.com/d/msg/jira-workflow-toolbox-plugin/ZZL5tbi4e7E/mxg_JxRb8fYJ

Regards,

Fidel

Dan Sitarski April 18, 2013

Hi Fidel,

Thank you for the response.

Question 1: I added the 'Validation on linked issues" to the create issue step and now the user is required to include at least one issue link.

Question 2: I'll have to review the requirement to be sure when the validator is added I do not produce a deadlock. The plan is to explicitly control which type of link is required and only issues from a particular project will be seleted.

Dan

0 votes
Ramiro Pointis
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 16, 2013

Hi @Dan, almost a year ago someone asked the same thing so I think you can find your solution here:

https://answers.atlassian.com/questions/49347/make-issue-link-a-required-field-is-not-being-enforced

Hope this helps!

Ramiro Pointis
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 18, 2013

It's about doing some coding on the Script Runner plugin but I haven't tested it myself yet. In that question they have written some code you could use.

Dan Sitarski April 18, 2013

Ramior,

Thank you for the feedback on how to make the linked issue required.

Dan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events