Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Screen does not open on transition when I use a condition, validation required?

Edited

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)

3 comments

Does anyone have an idea? I can't get any further.

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.

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.

@Trudy Claspill 

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:

SharedScreenshot.jpg

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

 @Trudy Claspill 

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.

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Apps & Integrations

🍂📹 Apptoberfest demo contest roundup: vote for your favorite demos!

Hi Community! The submissions are in (and listed below) for the 🍻🍂Apptoberfest🍂🍻 Demo Competition and it’s time for you to place your votes for the best: Analytics & reporting app demo ...

101 views 2 11
Read article

Community Events

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

Events near you