It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is there field type similar to Multiple Version Picker?

I'm creating a Module field where I need to have the user select multiple module values. Similar type of Fix Version field where we can select multiple module names with auto suggest option

3 answers

0 votes

Vishnu,

You can add version picker fields which allow you to pick from the releases/versions defined in a project.

You can also define multi select lists if you want to define the values globally.

Kian,
Not sure I'm following you correctly. You mean to say that create a custom field of type multi select but I don't think that will provide the picker option with auto suggest.

Requirement is to create a new field called Module and it needs to have different value not like version value but it should be Fix Version data type like Picker with auto suggest.

Ahh, I see. I misunderstood  your requirements.

Atlassian actually has a document outlining how this can be done. Check it out here.

Kian,

Not sure I'm following you correctly. You mean to say that create a custom field of type multi select but I don't think that will provide the picker option with auto suggest.

 

Requirement is to create a new field called Module and it needs to have different value not like version value but it should be Fix Version  data type like Picker with auto suggest.

That is correct. Module field should be an auto suggest field values but no access for end user to add new values to the list.

0 votes
Leo Community Leader Nov 18, 2019

Hi @Vishnu C ,

I'm not sure I got you or not

If my understanding correct, you want your multi-select field should behave like component/s or version picker fields. so that when user start typing it should filter the value and allow them to select from them 

if so you can follow below steps to achieve it

1. Create Select List(Multi choice) field with your options

2. If the field is going to be used by only your project place the following javascript in field's description else go to respective project's field configuration and edit Module(custom field) field place the same there in field's description

<script type="text/javascript">
(function($){
new AJS.MultiSelect(
{
element: $("#customfield_13711"), itemAttrDisplayed: "label", errorMessage: AJS.params.multiselectComponentsError //need to place valid custom field ID there
});
})(AJS.$);
</script>

BR,

Leo

@LeoWhere did you get your code? Just wondering since the Atlassian document has some differences:

<script type="text/javascript">
(function($) {
    AJS.$("#customfield_<cf-id> 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_<cf-id>");
    })
  
    JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) {
        AJS.$("#customfield_<cf-id> option[value='-1']").remove();
        convertMulti("customfield_<cf-id>");
    });
})(AJS.$);
</script>
Leo Community Leader Nov 19, 2019

I forgot actually it was in my old docs, which still works in newer versions of jira as well(I've verified in 8)

And one more thing, above snippet will remove "None" value from select list. but I didn't include that into my JS code

@Kian Stack _Mumo Systems_ 

 

I added the script in custom field description. Now the field got disabled and Create bug keeps loading I cant open the Create link itself. After deleting the field from the screen I'm able to create the issue. But another problem is I cant delete this custom field now. When I search for the word Multi itself the screen is non editable. I cant access the fields also. please help. custom.png

I'm sorry, it is working for  me.  If it prevents you from loading I would disable it for now until you can get it working in a test environment.

Try loading it in a different browser. You can disable javascript temporarily on the browser. https://www.searchenginepeople.com/blog/disable-javascript.html

Problem is n my company they disabled the options to change the browser settings.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you