Hi I'm trying to write a "Linked Issues Status Validator" validation rule that only runs against a sub-task if a custom field on the sub-task is set to a specific value. Otherwise don't run the validation.
Is this possible with a linked issue validation rule?
Unfortunately, you can't do that with the Linked Issue Status Validator. You'll need to use the Linked Issues Validator instead, and test both the linkedIssue status and custom field in the Jira expression. Something like:
linkedIssue.customfield_12345.value != "An option value" || ["Status 1","Status 2"].includes(linkedIssue.status.name)
where customfield_12345 is the field ID of the custom field (assuming it's a single-select type field - otherwise, use the "Issue Fields" help tab to find out how to test your specific custom field) and "Status 1", "Status 2" the two statuses you want the sub-tasks to be in.
Unfortunately, it does not work.
Look at this phrase, this is what I want to express:
At least one issue link of the duplicates link type must be added to the transition screen , and at least one linked issue must satisfy the following Jira expression:
I need to use the following expression, right ?
The following message will be displayed if validation fails: You need to link an issue which status is not "duplicated"
But it does not work. I can still link an only issue which is duplicated.
Hi @Lily Wang ,
I don't see how "At least one issue link of the duplicates link type must be added to the transition screen , and at least one linked issue must satisfy the following Jira expression:" matches with the validation error message ("You need to link an issue which status is not "duplicated").
Based on the error message, I would assume you want to force the user to add an issue link on the transition screen, and the linked issue should not be in the "duplicated" status. Or do you simply want to prevent users from linking to an issue that is in the "duplicate" status (but not force them to add a linked issue)?
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events