Jira workflow toolbox: marking linked issues field required

I want to require the user to complete the Linked Issues/Issues field when transitioning in a workflow.  What is the command/option I will want to choose in the workflow toolbox add-on?  Thank you.

4 answers

You should add "Validation on linked issues" validator to the screen transition with a configuration like the following one:

  • Issue Link Types: check the issue link type you want for linking to Test case issues.
  • Issue types for linked issues: Test case
  • Statuses for linked issues: don't check any (I'm assuming you don't want to apply restrictions on linked issue's status).
  • Resolutions for linked issues: don't check any
  • Filtering by field values: leave it empty

  • Minimum required number of issue links: 1
  • Maximum allowed number of issue links: 9999
  • Allow unselected issue link types: CHECKED
  • Allow unselected issue types: CHECKED (I'm assuming that the issue link type used for Test cases can also be used for linking other issue types.
  • Allow unselected statuses: CHECKED
  • Allow unselected resolutions: CHECKED
  • Allow unsatisfied condition on field values: UNCHECKED

 

That did the trick! For extra credit, I even added a message for them to add an issue.

 

Thank you!

I am trying to link an issue type by entering the ticket number and it's not allowing me to move to the next screen.  Within my Validator, I have the Issue types for linked issues set to Bugs and Test so in theory, as long as the issue type is either one of those, I should be able to link it, correct? 

Actually, I played around with additional settings and I was able to link the issue

Linked issues not working.  (see use case below)

Current settings are wide open.  

  • Issue Link Types: no value selected
  • Issue types for linked issues: Bug and Test
  • Statuses for linked issues: don't check any (I'm assuming you don't want to apply restrictions on linked issue's status).
  • Resolutions for linked issues: don't check any
  • Filtering by field values: leave it empty

  • Minimum required number of issue links: 1
  • Maximum allowed number of issue links: 9999
  • Allow unselected issue link types: CHECKED
  • Allow unselected issue types: CHECKED (I'm assuming that the issue link type used for Test casescan also be used for linking other issue types.
  • Allow unselected statuses: CHECKED
  • Allow unselected resolutions: CHECKED
  • Allow unsatisfied condition on field values: UNCHECKED


Use Case: 

I attempted to Pass Bug (issue type

  • Fix Version/s: 5.4.0
  • Linked Issues: [is tested by] Test (Issue Type)
  • Press [Pass]
    Receive message, "Please enter an Issue Link" even though I have a linked issue type entered

 

Hi Scott,

Please, attach a screenshot of the validation's tab in your transition. I want to see the actual configuration of the validator.

 

the formatting isn't the best so let me know if you need a specific setting narrowed in on.

I don't have access to the document. I have asked for permission.

Anyway, you can add images to a post in Atlassian Answers, which I think it's the best way to post screenshots in this site.

Scott, it's very difficult to read your document in the screen of my laptop. I only need the screenshot of the validation's tab, i.e., the screen showing all the validations in the transition once you have saved the configuration of the validator. That screenshot is much smaller and shows the whole configuration of the validator.

Yeah, that would make more sense.  Here you go:

image2016-8-31 17:56:11.png

Scott,

With that configuration the validation will require at least 1 linked issue (any issue link type, any issue type, any status, any resolution) but linked issue must belong to the same project as current issue. I have tested that same configuration and I can confirm that it works as I have described.

If you link at least an issue to your current issue which belongs to the same project, the validator should allow you to execute the transition.

Some questions:

  1. Is your validator in Create Issue transition?
  2. Are you entering the issue link in transition screen?
  3. Which version of JIRA are you running?
  4. Which version of JIRA Workflow Toolbox are you running?

 

  1. No, the validator is not on create.  We are using a pass/fail type workflow and when we have a test case to pass, we want to link it to it's original ticket.  Both issues (bug and test) are from the same project.
  2. Yes, we have a transition screen with the field 'Linked Issues" where we enter "is tested by" and the issue number we want to link.
  3. JIRA Software (Server) 6.4.5
  4. 2.2.17

 

Scott, I would like to watch your screen while you test the validation. Can we share the screen through Skype? My Skype user is fidel100r.

please email me directly at scott.mcdonald@code42.com so we can work on screenshare.  we don't allow skype here

Hi! Did you solve the question? I think I'm facing the same issue, I have a transition with the "Linked Issues" field in the screen, but the Link validation is always rejecting the action, although I properly fill the form. Could you share the solution of your problem if you solved it?

Thanks!

Hi Fernando,

I had a video conference with Scott. I don't remember the details, but there was nothing wrong with the plugin, but with the configuration and the behavior he was expecting.

Please, let me know the exact behavior you are expecting, specifying issue link types, issue types, statuses, and any other detail of the linked issues. Please, also attach a screenshot of the current configuration of your validator.

Hi Fidel, 

I was sure that the problem was that I was doing something wrong in the validator configuration and not a bug, the plugin is great! wink. I've already found the proper configuration and it works like a charm now. Thanks for your quick response!

Hello Fidel - 

I am using the 'Boolean validator with math, date-time or text-string terms' Validator since I couldn't get the Validation with LInked Issues working.  

Scott

Hi Scott,

If you wish, post the boolean expression you are using, and I will give you an equivalent configuration for "Validation on linked issues".

Fidel

count(filterByIssueType(linkedIssues("is tested by"), "Bug, Test")) > 0

The following configuration of "Validation on linked issuespost-function is equivalent to a boolean validator with boolean expression

count(filterByIssueType(linkedIssues("is tested by"), "Bug, Test")) > 0

:

  • Issue link types: check only "is tested by":
  • Issue types for linked issues: check only "Bug" and "Test".
  • Statuses for linked issues: all UNCHECKED.
  • Resolutions for linked issues: all UNCHECKED.
  • Linked issues must belong to: check "any project".
  • Filtering by field values: leave EMPTY.
  • Minimum required number of issue links: 1
  • Maximum allowed number of issue links: 9999
  • Allow unselected issue link types: CHECKED
  • Allow unselected issue types: CHECKED
  • Allow unselected statuses: CHECKED
  • Allow unselected resolutions: CHECKED
  • Allow unsatisfied condition on field values: UNCHECKED
  • Skip validation when: all UNCHECKED

Hi Scott,

Do you want the user to create at least an issue link when transitioning an issue?

Are you interested in require a specific issue link type and/or issue type of the linked issue?

Hello - 

I have added the Linked Issue field to the transition screen and want to make that field required so they can add an linked issue..The use case is the expected behavior is the tester could not press the [Pass]button unless there was a linked test case.

Thank you.

I am having an issue with the below validation - can you please help?

Validation on linked issue:
At least 1 and no more than 1000 issue links with the following characteristics: 
  - Issue link typesImpacts or blocks.
  - Linked issue's issue typeArtifact.
  - Linked issue's statusUnit and / or Integration TestingQA/UAT SupportNewReady For Prod or Active.
  - Linked issue's resolutionany 
  - Linked issue belongs to projects with keysDA 
About the rest of issue links: 
  - Unselected issue link types are allowed
  - Unselected issue types are not allowed
  - Unselected statuses are allowed
  - Links to issues in any other projects are allowed
Message to show when validation fails: "A Testing Defect MUST be linked to a Deployable Artifact (either Impacts or Blocks) when transitioning from RCA to In Development".

The above always fails unless "Unselected issue types are allowed". Please note that I only want to allow Impacts or Blocks issue types.

Thank you for your help,

Bart

Note that the below validation, on CREATE, on a different workflow works as I would expect - ie: the link type MUST be "Is a Deliverable of" and the issue type MUST be a "Higher Level Initiative".

Validation on linked issue:

At least 1 and no more than 1000 issue links with the following characteristics: 
  - Issue link typesIs a Deliverable of.
  - Linked issue's issue typeHigher Level intitiative.
  - Linked issue's statusActive.
  - Linked issue's resolutionany 
  - Linked issue belongs to projects with keysHLI 
About the rest of issue links: 
  - Unselected issue link types are not allowed
  - Unselected issue types are not allowed
  - Unselected statuses are not allowed
  - Links to issues in any other projects are not allowed
Message to show when validation fails: "When a BTD is created it must be linked to an Active HLI via the link type "Is a Deliverable of"".

Hi Bart,

I have some questions:

  1. Is the validator in the workflow of issue type Testing Defect?
  2. Do you have a type Deployable Artifact? In the message you use that name, but you have selected Artifact.
  3. Do you allow Impacts and blocks issue links to issue types different from Artifact?

 

Hi Fidel,
I am working for Bart. Bart is not available at this time so for quick resolution I am responding 
Please note my comments below:
  1. Is the validator in the workflow of issue type Testing Defect?
    ->   Yes,validator is in the Testing Defect workflow.
  2. Do you have a type Deployable Artifact? In the message you use that name, but you have selected Artifact.
     ->  yes we do have a Deployable Artifact project and Artifact is an issue type init.
  3. Do you allow Impacts and blocks issue links to issue types different from Artifact?
    we don't want to allow impact and blocks issue links  other than Artifacts.


Thanks,

srikanth 


 

Hi Srikanth,

If the validation is being satisfied when "Unselected issue types are allowed" is checked, and otherwise is failing, then the reason must be that you have at least one Impacts or blocks issue link to an issue that is not an Artifact.

Please, check carefully the issue links in the issue you are using for doing the testing, and tell me whether I'm right.

You can also try "Boolean condition with math, date-time or text-string terms" with the following boolean expression. It should work as you describe:

count(linkedIssues("Impacts, blocks")) > 0 AND count(linkedIssues("Impacts, blocks")) = count(filterByStatus(filterByIssueType(linkedIssues("Impacts, blocks"), "Artifact"), "Unit and / or Integration Testing, QA/UAT Support, New, Ready For Prod, Active"))

Good Morning Fidel,

I was unable to respond more than 2x in a 24 hour period so I was not able to answer your questions till now:

  1. Testing Defect is the issue type in which the links are being added. The validation rule occurs when the issue is transitioned from RCA to In Development. We require that at least one Artifact (an issue type in Project Deployable Artifact) is added as a link using Impacts or blocks (no other link type nor issue type should be configured)
  2. Deployable Artifact is the Project; Artifact is the issue type
  3. No other issue links should be allowed

Regarding Unselected issue or link types, there are neither when the validation fails.

Thank you,

Bart

Hi Bart,

I don't understand why it's failing. "Validation on linked issues" is a much tested feature, and there isn't known bugs since very long. I think that there is some kind of misunderstanding. 

I would like to have a screen-share with you in order to see the failure in direct. If it's possible, contact me privately at fidel@workflowarts.com.

Have you tried the boolean validator?

Hi Fidel,

I will contact you via the email provided. Please note that we did try the boolean validator; while it worked for the issue type and link types required, it did allow other issue and link types.

Best Regards,

Bart

In your configuration of "Validation on linked issuesyou have:

  - Unselected issue link types are allowed

That parameter is used to keep the rest of issue link types unrestricted.

The boolean expression that restricts other issue link types is:

count(linkedIssues()) > 0 AND count(linkedIssues()) = count(filterByStatus(filterByIssueType(linkedIssues("Impacts, blocks"), "Artifact"), "Unit and / or Integration Testing, QA/UAT Support, New, Ready For Prod, Active"))

Hi Fidel,

Per our discussion, and based on your assistance, we have implemented the below which successfully solves for our situation. 

Thank you again for your help!

  • The second validator is used to set the allowed issue link types
  • The first one is to require at least 1 issue link "Impacts" or "blocks".

 

Validation on linked issue:
At least 1 and no more than 1000 issue links with the following characteristics:
  - Issue link typesImpacts or blocks.
  - Linked issue's issue typeArtifact.
  - Linked issue's statusany
  - Linked issue's resolutionany
  - Linked issue belongs to projects with keysDA
About the rest of issue links:
  - Unselected issue link types are allowed
  - Unselected issue types are not allowed
  - Links to issues in any other projects are allowed
Message to show when validation fails: ""A Testing Defect MUST be linked to a Deployable Artifact (either Impacts or Blocks) when transitioning from RCA to In Development".".

 

Validation on linked issue:

At least 0 and no more than 9999 issue links with the following characteristics: 

  - Issue link typeshas EpicImpacts or blocks.
  - Linked issue's issue typeany 
  - Linked issue's statusany 
  - Linked issue's resolutionany 
  - Linked issue belongs to any project
About the rest of issue links: 
  - Unselected issue link types are not allowed
Message to show when validation fails: "The only issue link types allowed are "Impacts" and "blocks".

Thanks Bart for posting the working configuration. The problem you were having was that you were not considering Epic Link in your validation. Links to/from epic issues are represented by "has Epic" and "is Epic of" issue link types.

Hi

Can you provide me configuration for validation on linked issue for below given

usecase

Parent Bug  can only be closed if all the child issues are closed.

Hi Juby,

Assuming that when you say child issue you mean sub-tasks, you can use "Validation on subtasks" with the following configuration:

  • Subtask's issue types: don't select any option.
  • Subtask's statuses: select "Closed", "Done", "Resolved", or any other status you use for considering that sub-task is closed.
  • Subtask's resolutions: don't select any option.
  • Filtering by field values: leave this parameter empty.
  • Minimum required number of subtasks: 0
  • Maximum allowed number of subtasks: 9999
  • Allow unselected issue types: CHECKED
  • Allow unselected statuses: NOT CHECKED
  • Allow unselected resolutions: CHECKED
  • Allow unsatisfied condition on field values: NOT CHECKED
  • Skip validation when: Don't check any option.
  • Message to show when validation fails: "There is at least a non-closed sub-task."

Hi Fidel,

Thanks. 

By child i meant links, The sub task part i got it.

Thanks for helping.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,760 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot