I think I'm on the right track, but somewhere I have a reasoning error. I hope you can help me.
There is a status "New Upload" which can be set to "National Release" with the transition "Release". Everything is good so far. Clicking on the transition "Release" opens a screen containing two custom fields with the status "open" or "done". The Open and Done fields are both custom fields with a single choice.
Now to the problem.
I want the jump to "National Release" to only happen when both fields are set to "done". I tired to solve this with a condition, but the result is that the screen no longer opens.
That's why I think I have to solve this by validation and not with a condition.
But the expression does not work.
issue.customfield_10833 == 'done'
What am I doing wrong?
Many thanks in advance.
(I have the JMWE)
Absolutely right. That was the solution. To check the selection field for the value "done", I have chosen the following function:
!!issue.customfield_10833 && issue.customfield_10833.value == "done"
Without "done" it does not continue as desired.
I don't use JWME but from reading the documentation this validator (Field Required Validator) is only for validating that the field is not empty, and the Validator Scope is to define when the field is required (i.e. field is required for issues of type Story). I don't think this validator is for validating that a field has a specific value. See
https://www.innovalog.com/videos/37-jmwe-cloud-videos/257-workflow-validators-for-jira-cloud
I think you should able to construct the right type of validator using the Build-your-own option, but I have not worked out the details.
https://innovalog.atlassian.net/wiki/spaces/JMWEC/pages/935362565/Build-your-own+scripted+Validator
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want to give the user the option to meet the conditions in the Validator as part of completing the transition, then you add a screen to the transition to present the fields that the user might need to change to meet the conditions.
Exactly, I have created a screen in which a custom field has the status "Open" or "Done". The transition should only be performed when the custom field is set to "Done".
But I can't get any further with the validation because the custom field with "Done" and "Open" is probably also a text field, i.e. a string. I don't know how to rewrite the function so that my intention works.
So funktioniert es auch nicht:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Seb
In what way is your validator not working? What symptom are you seeing that indicates it isn't working?
If you want to block the ability to try to change to a particular Status, you would use a Condition. The Conditions must be met or the specified Status will not appear as an option to select.
If you want to ensure that certain conditions are met as part of completing the transition, then you use a Validator. That allows the user to select the specified Status, and the Validator will check that the conditions are met when the user tries to save the status change.
If you want to give the user the option to meet the conditions in the Validator as part of completing the transition, then you add a screen to the transition to present the fields that the user might need to change to meet the conditions.
So, you are on the right track in using a Validator. Tell us more about how your transition is not working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.