It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
Hello.
We have a multi select list in our transition screen where it is pre-selected according to the selected values in the same select list in the parent Jira.
In Behaviour plugin, we pre-select the select list by using setFormValue function. It works but what we would like to do is displaying and converting the multi select list to an auto complete multi picker.
We use the following code to convert the select list into a auto complete multi picker by pasting the lines in the description field.
<script type="text/javascript"> (function($) { // "customfield_11315" is the number of the custom // multiselect field you want to change as e.g. // seen at the end of the "configure" page url of // the field you want to change this way AJS.$("#customfield_11315 option[value='-1']").remove(); //Removes the default value "None" function convertMulti(id){ if (AJS.$('#'+id+"-textarea").length == 0){ new AJS.MultiSelect({ element: $("#"+id), itemAttrDisplayed: "label", errorMessage: AJS.params.multiselectComponentsError }); } } AJS.toInit(function(){ convertMulti("customfield_11315"); }) JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) { AJS.$("#customfield_11315 option[value='-1']").remove(); convertMulti("customfield_11315"); }); })(AJS.$); </script>
The problem here is that the auto complete multi picker doesn't display the pre-selected by the Behaviours plugin (setFormValue) in its text area. The pre-selected values aren't available in auto comlete multi picker's available (unselected) dropdown list either.. so i assume the values are actually selected but just are not displayed correctly in the multi picker's text area.
Has anyone else come across with this issue? I wonder if I could get the pre-selected option values correctly displayed in the auto complete multi picker's text area by tweaking the javascript above?
Thank you in advance!
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.
Read moreHey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...
Connect with like-minded Atlassian users at free events near you!
Find a groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.