Hi,
I need to somehow unset specific value from checkbox options. I don't want to use additional add-on except (JIRA Misc Workflow Extensions and JIRA Suite Utilities). Is this possible?
e.g.
I'm trying to use Set field value (JMWE add-on) post function but it seems that syntax is allowing me only set specific value not unset. Because you need to add something like that [{"value":"optionA"}] value=constant, optionA=name of the value.
I would expect something like selectedValueID:[true|false] e.g. 12800:false
Thanks!
Martin
Hi Brian,
I managed to do my task in a different way but if you want to unset - use a post-function Set field value (JMWE add-on) and then use Nunjucks annotations and use for cycle and if construct. You need to just remove defined value from a collection (array).
For example How to set MyCheckboxTitle value to false:
{% set output = "" %} {% for item in CheckboxGroup %} {% if item.value != "MyCheckboxTitle" %} {% set output = output+item %} {% endif %} {% endfor %} {{output}}
Be aware that the output MUST be in this kind of format:
[{"value":"item1"},{"value":"item3"}]
So may be you need adjust slightly the row "{% set output = output+item %}". I don't test it. Use e.g. Description field to see what is in the output variable.
Hope it helps.
Martin
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.