If the change category (custom field xxx) is "abc" or "xyz":
For any other category:
I tried both below scripts with build your own validator
Trial 1
if (issue.customfield_xxx?.value == "abc" || issue.customfield_xxx?.value == "xyz")
{
return issue.customfield_aaa <= (issue.customfield_bbb + "20d");
} else {
return issue.customfield_aaa <= (issue.customfield_bbb + "2d");
}
Trial 2
(issue.customfield_xxx!= null && (issue.customfield_xxx[0].value == "abc" || issue.customfield_xxx[0].value == "xyz") && (issue.customfield_bbb != null) && (issue.customfield_aaa != null)
(issue.customfield_aaa[0].value <= (issue.customfield_bbb[0].value + (20 * 24 * 60 * 60 * 1000)))
Both throws error even I set date below 20 days. Can someone please spot what I am missing
Note: I am trying this in Workflow validator
As this is not ootb standard functionality within Jira, what 3rd party marketplace app is used to construct this custom validator?
This will help community members, based on experience with the 3rd party app if they will be able to assist
I am not using any 3rd party app. I tried in Workflow --> Validator --> Build your Own Validator
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This type of validator comes from a 3rd party app, this is not an ootb function of Jira
These are the default ootb validators in Jira:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now comes my real question.
What is the validation used for, preventing transition to a next state?
A workflow validator acts on information in the field, as you mention you update the field, this seems more like an automation rule should be set in place to monitor the field values.
Or is this field on a transition screen only and used in a single transition to be checked and not editable, but only viewable on the issue screen?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not updating automatically. I am writing script to Validate the below,
For Categories "abc" or "xyz":
For All Other Change Categories:
The Context is This validation should occur when the user updates both the start date and the end date, ensuring that the new values meet the specified requirements.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not able to figure this out as well
Conditional logic should be possible, according to documentation, Conditional+execution
@David Fischer {Appfire} Could you help out in this request?
I would be interested to se this solved, if possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.