Jira JJUPIN setting custom check box field

I created very simple (so I thought) SIL script to make sure a yes / no check box custom field could not be set to both yes and no at same time.

The problem is I can not figure out how to set the field in the SIL script

I know the field is a string array what I can not figure out is how to set it

customfield_14002 = ? -- to select the Yes check box smae for clearing the Yes check box

2 answers

Hi William,

The syntax is: customfield_10402="Yes"; for selecting the Yes checkbox, customfield_10402="No"; for selecting the No checkbox, and customfield_10402=""; for clearing the checkboxes. SIL is smart enough to automatically convert the string value to string array.

You may also consider using radio buttons instead of checkboxes, if you only want one value selected at a time.

Kind Regards,


Thanks but not working for me

Here's the code

logPrint("INFO", "Unit test field changed: " + key);
logPrint("INFO", "Unit test index 0: " + customfield_14002[0]);
logPrint("INFO", "Unit test index 1: " + customfield_14002[1]);

-- Did not clear the fields when I checked both the yes & no checkboxes

The log entery shows the field status but the code snip-it is not clearling the checkboxes

Do you have any errors in the log?

I see a typo in your script: a missing semicolon at the end of the customfield_10402="" statement.

Please let me know also what Jira and jjupin versions are you using and where do you use your SIL script. Also, please attach the entire SIL script. (I suppose what you posted is just a part of it)


No errors in the log and the missing semicolon was my cut and paste. SIL would flag error when check the file before saving

Only thing I see in the log is the SIL log messges to confirm that the script fired as expected

And thanks for fast response to my update :)

When is the SIL script fired?

P.S You can add another comment to this post instead of new answer

Can you please attach the live fields SIL scripts that you are using?

I suppose you have a main SIL script that calls the lfWatch routine on the checkbox routine and executes a hook script.

If this is the case you should try using the lfSet routine in the hook script instead of trying to pass directly the value for the field on issue: http://confluence.kepler-rominfo.com/display/JJUPIN/lfSet

Your statement would be lfSet("customfield_10402", "");

When the custom field is changed

I have a Live Fields script that call the SIL script when the custom field changes

Here's script as you guessed as a mainSIL script

// check for unit test completed check box change
lfWatch("customfield_14002", {"customfield_14002"}, "UnitTestCompleted.sil", {"change"} );

FYI - tried the 'lfSet("customfield_10402", "");' still did not clear the check boxes

Please attach also the hook script "UnitTestComplted.sil". If you are checking the checkbox value in the hook script, make sure you use argv["customfield_10402"] and not directly customfield_10402.

Hope this helps.

I have tested your configuration and everything works as expected.

Do you have this problem on any browser and on any issue screen? What Jira and JJupin version are you using?

Currently not doing anything in the script since during test was not able to set / clear fields

Here's full script

// Script to make sure unit test completed check box is not set to yes & no both
// Created by W Gunkel April 24 2014

logPrint("INFO", "Unit test field changed: " + key);
logPrint("INFO", "Unit test index 0: " + customfield_14002[0]);
logPrint("INFO", "Unit test index 1: " + customfield_14002[1]);
lfSet("customfield_10402", "Yes");

Jira 5.2.11

JJupin Version: 2.5.13

I just tested also on Jira 5.2.11 with JJupin 2.5.13 and couldn't reproduce the problem.

Please let me know what browser are you using and on which issue screens are you experiencing the problem and also check for any related errors in the log file.


I have tried with Chrome 34.0.1847.131 and FF 28 same results. Fact that you cannot reproduce the issue (and thanks for the help) make me wonder if my Jira sandbox is valid environment. I will do some addtional checking

What about the JJUPIN custom field mapping - for the multicheckboxes mapping is set (cannot chagne it)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

460 views 8 27
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you