Restricting edition of a custom field

I want a custom field called 'Root Cause' exactly similar to Components field( which comes by default in jira) of Labels type but only admin should be able to add/modify values to it, others should only be able to select the possible options that come as drop down suggestion. I tried with Jira security plugin but using that i found that thsi field doesn't appear as part of som e tranmsition screen for anybody else other than admin for whom we have set security scheme. Actually field security scheme only gives two options "Allow all" or " deny all". Please help me on this.

2 answers

0 vote

It sounds like you just need a simple multi-select custom field. Administrators determine the list of options on those, users can put them in. You don't need to think about security or plugins to do that.

Actually it should be multiselect field but it should be of type labels exactly similar to like components...so that once such a label option is selected for this field it should be navigable on the view screen

Hi Nic,

I would want to have this custom field in some transition screen say for eg closing of isssue wherein this field should appear for all on that transition screen but then other user only able to select value from there but Project admin ( not jira admin who can add default values to custom field under custom field configuration as drop down options) can also add new values to it and then submit the closing screen. This can't be achieved by multiselect field as they don't give option like labels and need to be modified through custom field configuration which can be done only by jira admin or jira system admin.

Joe Pitt Community Champion Jun 11, 2014

JIRA doesn't allow project admins to update field configurations.

You need to make up your mind whether you want the value option list to be available to users (use labels) or controlled by admins (use a select list)

Hi Nic,

To be more clear we all know about Components field in jira which gives option to user to select options but they can't create one unlike any labels custom field because that is internally driven by components created inside project and so will show only component options to any user for those which exist inside Components section of Project.

Likewise i need another custom field whose drop down options should be created/modified by project admin and user can only select those from drop down rather than being able to create a new one like any label custom field. Herein multiselect list custom field could have been the option but they don't serve the purpose of labels/components as they aren't navigable. Because you see if you select any drop down option into labels custom field it will appear as label and you can click that from view screen or somewhere. The same goes with components too.

So in all i need a separate custom field taht fulfils the purpose exactly similar to that of components.

Could yopu please help on this or based on all above mentioned requirements suggest some alternative for that. I'll be fine with anything.

Thanks,

Ashley

Mmm.

The question of who controls the list of options is your actual question, not controlling the edit. At the moment, you've got three basic types:

  1. Labels - anyone can add a new item
  2. Select list - only system administrators control the list
  3. Components - only project administrators can control the list locally in the project, but there is only one list of components.

To do what you want (after you've decided on how fixed the list is), you'll need code because there are no custom fields like that. Of course, before coding, you might want to look for addons. I'd try https://marketplace.atlassian.com/plugins/jira.plugin.projectspecificselectfield.jpssfto start with.

Hi Nic,

Everything you suggested is fine except the fact that when i'm trying to add or disable options for the Project Specific Select Field type custom field in my standalone jira application(testing purpose) it goes to some url which does nothing and options are neither added nor deleted for my custom field.Rest everything works fine.

So how am i supposed to add options or disbale options as Project admin wherein this plugin gives that feature but while attempting to do so redirects to some url say:-http://localhost:8080/browse/?new_option_value=test1&customfield_id=10201

and then nothing happens. Do i need to have to do something additional? pLease help me on this.

That sounds broken to me. It's not what it does on the installation I've got it in. Have you checked the versions of the plugin and Jira are compatible? Correct base url in Jira?

Hi Nic,

I'm not doubting over your solution because i know it is correct but somehow i would like to make it work on my jira standalone application also.My jira version is 6.2.1 and jira plugin was same which i got installed throughthe plugin url link provided by you. I just don't understand that despite plugin having got installed correctly and showing the Project Specific tab for my custom field( because i configured this custom field in context to one of my projects) its not allowing me to add or delete options. I would rather say it still allows me to ad or delete options but on clicking add or disable the page moves and comes to some blank page without showing any error as if somethiong went wrong internally.

Please just tell me one thing will it work on my hosted web application once i install it because i'm tired of experimenting on my standalone application.

If it doesn't work in test, it probably won't work on "hosted", whereever that is.

Could you check the versions in use are correct for your Jira? And could you check that your base url is correct?

Hi Nic,

Could you help me on how to check if versions in use are correct for jira and what you meant by base url is correct.

My base url in my standalone application is ofcourse http://localhost:8080.

Did you mean something else. Please help me on this

I jsut wanted to check the base url because it's bitten me last week (spelling mistake in it - all sorts of plugin weirdness). As long as that's definitely the url your Jira is running on, it's fine.

To check versions go to the market place page for the addon and look at the "versions" tab - each version should list the range of Jira versions it is valid for. Just make sure you are using a version that covers your Jira

Hi Nic,

I just checked and noticed that my plugin version is 2.0.3 which is compatible with my jira version 6.2.1.

My base url is also perfectly alright:- http://localhost:8080

Is there anything else i need to check may be my installation part or something. May be some files are missing which is not allowing the browser to add or delete options from my custom field.

BR,

Ashley

I'm convinced you've run into a bug in the plugin, and you'll need to raise it with the author

Although, having typed that, one last thing - what version of Java are you running Jira with? (If you used a Jira installer then don't bother to check, it's fine. If you installed manually, then check the system information page in Jira)

Hi Nic,

Let me explain you what i did. I simply installed jira 6.2.1 on my machine which comes with inbuilt java i guess. I didn't have to install java separately on my machine.

My jira system info java details are:-

Java Version 1.7.0_25
Java Vendor Oracle Corporation
JVM Version 1.7
JVM Vendor Oracle Corporation
JVM Implementation Version 23.25-b01
Java Runtime Java(TM) SE Runtime Environment
Java VM Java HotSpot(TM) 64-Bit Server VM

Please ask me if you require to know anything else. I just long to let my plugin work somehow to allow me add or delete options in my custom field.

If you require me to delete the plugin and install again please let me kenow but also guuide me with proper steps to do that so that i don't end up with any bug this time.

BR,

Ashley

This answer might help you. The code in the description makes a multi-select field behave Components field, auto fill on typing.

https://answers.atlassian.com/questions/43534/can-i-have-multi-select-custom-field-behave-like-components-versions-fields

Hi Vijay,

I tried out this on one of my multiselect custom fields but it doesn't produce any effective result. I replaced the custom_field id with that of mine in the code and also added the correct java script code under description of my field but failed to notice any changes.

Could you please tell me the entire process.

Hi,

Here is what I did. Create a custom field of type "Select List (multiple choices)". Added the script below in description of the field.

<script type="text/javascript">
 
(function($){
    new AJS.MultiSelect({
        element: $("#customfield_14250"),
        itemAttrDisplayed: "label",
        errorMessage: AJS.params.multiselectComponentsError
    });
})(AJS.$);
 
</script>

Note that you need to change the customfield_14250 for your customfield ID.

The field acts as autofill on the screen afterwards.

Hope this helps.

Regards,

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

53 views 0 5
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