How to validate checkbox options in transition screen, which are selected in create screen

Issue #164 resolved
Raju Adluru created an issue

Fidel I need your help in this tricky case Here is the use case: On create screen user have option to select multi select check boxes: Which options required? [ ] option1, [ ] options 2 [ ] option 3 [ ] option 4

On Transition screen, i need to check, if any of above options selected, and they are approved. Were options approved? [ ] option1, [ ] option 2, [ ] option 3, [ ] option 4

If user selects option 1 and option 3 on create screen, on transition screen i need to force user to select same options telling that they got approvals, other wise error message.

These two are "Which options required?" , "Were options approved?" custom fields check boxes.

Suggest me if check box or multi select option is good here.

JIRA Version : 6.3.12 Workflow toolbox : v2.1.33

thanks much for your support and help. Raj

Comments (3)

  1. Fidel Castro Armario repo owner

    Hi Raj,

    You can use indistinctly: Checkboxes or Multi-Select custom fields. Both field types are OK for your purposes.

    You can implement the validation in transition using "Boolean validator with math, date-time or text-string terms" using one of the following boolean expression:

    • In case you want the exact same options in both field use the following expression:
    %{nnnnn} in %{ppppp} AND %{ppppp} in %{nnnnn}
    
    • If you want field "Were options approved?" to have selected all the options selected in "Which options required?", but also allow other options in "Were options approved?" to be selected even if not selected in "Which options required?", then use the following expression:
    %{nnnnn} in %{ppppp}
    

    Note that:

    • nnnnn is code for field "Which options required?"
    • ppppp is code for field"Were options approved?"
  2. Raju Adluru reporter

    Fidel This works great, thanks, i used the first option. Thank you so much for your help. Raj

  3. Log in to comment