Hi
We have installed a Checklist plugin which provides a text field in which a checklist is stored in form of bullet point items. The plugin does not deliver a validator checking if the list is filled on transition so as workaround we are trying to perform a Script Runner check. The code we use is:
import com.opensymphony.workflow.InvalidInputException if ( cfValues['Acceptance Criteria'] ) { invalidInputException = new InvalidInputException("Acceptance Criteria should be filled before starting progress") }
We get an error as expected but without the content from the Exception:
Screen Shot 2015-02-25 at 14.14.40.png
How can we succeed with this check using Script Runner?
Thank you,
Anna
Related: https://bitbucket.org/Whyves/checklist/issue/21/checklist-validator-is-filled
Hello and thank you for looking at this issue!
The Checklist plugin delivers only one validator which "Validates if a checklist has some or all items checked", it is useful on Close transition. But it will not check if there are any items are on the list, which is what I need on the Start Work transition. The related request to the Checklist plugin developers is about adding such validator to it.
That is why I wanted to check how to support this with Script Runner. Currently my issue is that error message from the thrown InvalidInputException
does not display after clicking Start Work in case when list items are empty - as a note: the transition does not have its dedicated screen. Anyhow the code is working correctly.
I see Yves has answer, but it depends on the type of object that is stored in the custom field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anna,
Checklist comes with a validator. Maybe it is not what you are looking for?
Please take a look at:
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.