what should i do, to add auto complete to any of my custom field. Any idea..?
I cannot see even auto complete renderer in drop down in field configuration drip down where we have
1. Default text renderer and
2. Wiki Type renderer
Please suggest.
I have two scenarios:
1. I already have custom field which iis of type JIRA Multiple Database Field (Can query a database and list the results for selection in an issue) and now i need to change it to auto complete
2. I want to create a fresh custom field, so how can i make it "auto-complete" simlar to what we have in "components" field in JIRA.
My sole motive is to creata "auto-complete" custom field..!! so if you can tell me any possible way or scenario through which i can implement it . I will be more th a happy.
I hope i am clear to you..
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the code we used to get multi-select lists working to look like the new autocomplete renderer:
<script type="text/javascript"> (function($) { AJS.$("#customfield_<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_<id>"); }) JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) { AJS.$("#customfield_<id> option[value='-1']").remove(); convertMulti("customfield_<id>"); }); })(AJS.$); </script>
It goes in the description field in the field configuration of a customfield. Replace the customfield id with your own one. I won't take credit for this. We found this post by another user earlier.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still not able to figure out..
can you please have a look at attached screenshots..
where i am missing .??
it would be really greatful.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What do you get on the screen where you try to enter data for this field? What shows up?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oops.. i think we can add only 3 attachments here as i added five..!!
neways what i get on my create issue screen is as follows:
Kindly suggest.!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Successfully used this as field description Provides "None" value, which disappears when selecting any (or multiple) other value(s), and re-appears when removing all previously select values Can be used multiple times in a single page (multiple multi-select fields with same script as description) Single issue found : if you are on the [jira-instance]/secure/CreateIssue.jspa page AND if you click "Create issue" on top right of the screen, the concerned fields just become non-working fields.
<script type="text/javascript">
jQuery(document).ready(function(){ console.log('Loaded'); jQuery.getScript('http://cdnjs.cloudflare.com/ajax/libs/chosen/0.9.12/chosen.jquery.min.js', function(data, textStatus, jqxhr) { jQuery("select[id^='customfield'][multiple='multiple'] option[value=-1]").html('Aucun'); // replace Label for "None" when necessary jQuery("select[id^='customfield'][multiple='multiple']").data('chosen', null); jQuery("select[id^='customfield'][multiple='multiple']") .chosen({no_results_text: "Aucun résultat : ", placeholder_text_multiple: " ", single_backstroke_delete: true}) .change(function() {if (jQuery(this).val()!=null) { if(jQuery(this).val().length>1 && jQuery(this).val()[0] == '-1'){jQuery('#'+jQuery(this).attr("id")+' option[value=-1]').removeAttr("selected").trigger("liszt:updated");}} else{jQuery('#'+jQuery(this).attr("id")+' option[value=-1]').attr("selected", "selected").trigger("liszt:updated"); } }); }); if(jQuery("body").size()>0){if (document.createStyleSheet){document.createStyleSheet('http://cdnjs.cloudflare.com/ajax/libs/chosen/0.9.12/chosen.css');} else {jQuery("head").append(jQuery("<link rel='stylesheet' href='http://cdnjs.cloudflare.com/ajax/libs/chosen/0.9.12/chosen.css' type='text/css' media='screen' />"));}} }); </script>
Successfully used this as field description
Provides "None" value, which disappears when selecting any (or multiple) other value(s), and re-appears when removing all previously select values
Can be used multiple times in a single page (multiple multi-select fields with same script as description)
Single issue found :
if you are on the [jira-instance]/secure/CreateIssue.jspa page AND if you click "Create issue" on top right of the screen, the concerned fields just become non-working fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi all,
i am trying to use the same script to work for me. I copied the same script above and pasted in the field description box. and replaced custom_<id> with my own custom_field id. But it is not working after re-indexing. please help.
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.
THank s guys, although was not able to figure out exact answer but management has chnaged the requirement.
So now I do not need it as of now..!! But wil definitely post its answer very soon as I am digging things here and there only. Forget to close it before. Apologies for that
Thanks for the efforts and suggestions . It made me true fan for atlassian answers club.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Harry Chan, your comment was very useful indeed . Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Take a look at https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.databasecf
It provides the autocomplete functionality out of the box.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.