Behaviours plugin in checkboxes and issue edit screen

I have a problem with the behaviours plugin when I'm using it for a field of type checkboxes.

What I'm doing, is, that depending if one especific option of the checkboxes field is selected, I show or hide, and set required or optional another field of type single line text. THIS IS WORKING FINE.

The issue, or the thing that's not working ok, is when I tried to edit the issue that have associated the field. When I click the edit button, the checkboxes that were selected, doesn't show as selected (all the options are blank). What I can see when editing the issue, is that initially the options are selected, but inmidiately, there is like a blink in the form, and the options get blank (like another reload), and if I inspect the element in the browser , I can see that at first the options were checked, (attribute checked="checked").

Another thing I found, is that this problem is generated just by adding or clicking the link "Add serverside script" for this field, what I mean saying this, is that if you add a field of type checkboxes to the behaviors field, and doesn't add a script, the checkboxes work fine, and when I edit the issue, the options values are loaded ok. But if I add a script for this checkboxes field, with just a line of code containing a comment, for example:

//this is a comment

(look that there is not code at all), and try to edit the issue, the options of the checkboxes are no selected, just by adding that line in the script.

Any ideas? I tried a lot to solve this, but not luck.

Question 2: by the way, what methods or javascript functions can I use in this plugin? I have tried to use a lot of java script functions, but they don't work, just a little of them work for me, there's a list or a place where I can find that? thank you.

15 answers

1 accepted

This widget could not be displayed.

Adding as an answer so this question can be closed.

And will be fixed in next release.

This widget could not be displayed.

Can you give some version info?

Any chance you could do some screenshots. For example if you take a look at the first screenshot on, it describes it perfectly, and I don't need to read a lot of text that is a bit difficult to follow.

This widget could not be displayed.

Here are the screenshots Jamie.

Image 1

Number 1 shows the custom field of type checkboxes, called Service Type, and whe you select the other option, a new custom field is shown, named Other Service, as you can see in image 2. If you uncheck the other option, the field is hidden again. This is working Ok.

Image 2

Image 3 shows the view of the issue, and you can see there that the Service Type field was saved with 'Staff augmentation' and 'Other' options checked.

Image 3

When I click the Edit button, I can see that the options are selected, as shown in image 4, but in less than a second (was a little hard to take the screenshot :D) I noted that was a little reload and the options selected are no more selected, as shown in image 5. This is the problem I'm having, I need that the options still remaing selected, that's the normal behaviour.

Image 4

Image 5

Image 6 shows that the options were checked initially, this is just by right clicking the element in the form and then click the inspect element option (using chrome).

Image 6

Note: This bad working doesn't depend of the code in the script of the behaviour, as I said before, just by adding a line of comment in the code cause this issue.

This widget could not be displayed.

hrm strange... i'll look into it (although not immediately). Thanks for the screenshots.

Ideally could you create a ticket at you can just link back to here.

This widget could not be displayed.

I forgot this: the version of the plugin I'm using is 0.5.10. Jira version: 6.1.5

For the ticket, I tried to log in with my atlassian account, but it doesn't work.

This widget could not be displayed.

Atlassian haven't integrated their AOD instances, you need to create a new account. I created the ticket for you:

This widget could not be displayed.

Thank you :)

This widget could not be displayed.

And will be fixed in next release.

This widget could not be displayed.

I'm running into this same issue. It looks like the latest available release is, but the problem will be fixed in 12. Is this true? If so, do you know when 12 will be available? Thanks, Matt

This widget could not be displayed.

I'm not sure what versions that relates to. The current version of jira is 6.3.8. The plugin version with the fix has already been released.

This widget could not be displayed.

According to JBHV-295, version 3.0-beta-9 is affected and the problem is resolved in 3.0-beta-12. Is the fix actually included in 6.3.8?

This widget could not be displayed.

Hi Jamie. I have the version 3.0.6 of the script runner, so, it's fixed in this version? Cause this issue is still 'in Progress' status.

This widget could not be displayed.

I've already verified by myself, and the issue is fixed, thanks.

This widget could not be displayed.

Matt. 6.3.8 is the version of jira, not the plugin. The current version is 3.0.6, which supercedes 3.0-beta-12. Jhonnatan, thanks, must not have closed the issue.

This widget could not be displayed.

Sorry to jump in on this post, but I have somewhat of a related question.

I am having issues with getting the behaviours to work on a checkbox field when multiple values are selected, so any help would be gratefully appreciated.

Basically, if the user selects multiple checkboxes including "Revision", the Revision Type field (Single Choice Select List) fails to display.

Could you please review my code and let me know what I am missing?

FormField ProductType = getFieldByName ("Product Type")
FormField RevisionType = getFieldByName ("Revision Type")
String ProductTypeVal = (String) ProductType.getValue()
if (ProductTypeVal == "Revision") {
else {

I have tried using if (ProductTypeVal in "Revision") as well, but still no luck.


Thanks for your support,


Got it! if (ProjectTypeVal.contains("Revision"))

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

203 views 1 3
Join discussion

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