JMWE Field Required Validator should work exactly as default Jira one. But I've encountered a problem with Comment field.
What I want to do is to make Comment required if resolution has particular value. So I create validator, click "Conditional validation" and insert "issue.resolution != 'Done'" in Condition field.
But in logs I see expression:"!(issue.resolution.name != 'Done' && issue.comments.length >= 0) || !!issue.comments && issue.comments.length > 0"
Why condition "|| !!issue.comments && issue.comments.length > 0" is being added to my constraint? In this case validation is true if issue has at least one comment, not necessarily my. That is not how default Field Required Validator works. It doesn't check other comments, only the one that is being added.
What are solutions for the problem?
.
Hi Alexey,
Conditions and Validators on the cloud are built on Jira expressions. So any condition or validator configuration is on whole represented as a single “Jira expression” (as shown in the logs). These are designed by Atlassian which currently are limited - https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables. We currently do not have the provision in Jira expressions to access the “transition” information. So the validator will consider the field values after the transition screen - what they can’t do is know what change was made on the transition screen.
Regards,
Radhika
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.