Documentation for JIRA 6.4 (This documentation includes the project navigation sidebar). Not using this? See below:
(JIRA 6.4 without sidebar documentation | JIRA 6.3.x documentation | JIRA Cloud documentation | earlier versions of JIRA)

Skip to end of metadata
Go to start of metadata

Please note that adding Javascript to custom fields is a customisation and not maintained as a supported part of JIRA.

Check the comments below. This page has been flagged as outdated.


As the users are neglecting the description of the Priority field, a more detail custom field is created to represent the Priority field. Depending on the radio button custom field selected, the Priority field value is set.

  1. Create a customfield name "Severity" at Browse >> Administration >> Issue Fields >> Custom Fields
  2. Configure the radio button custom field to have a field options
  3. Check the customfield ID in the Customfield table from the database by using the following SQL query:

  4. Modify the following javascript code so that <id>will be replaced with the id of the custom field found from the first step:

  5. Paste the javascript into the description of the "Severity" customfield at Browse >> Administration >> Issue Fields >> Custom Fields.

There is no need to hide or remove the 'Priority' field from the screen. The javascript code will hide the Priority field by itself.

  • No labels


  1. Anonymous

    On Jira 4.2, the naming of the customfield contains a '-' instead of a '_' in the end. The following snippet is working here with customfield id = 10133:


    Tom Moors [ACA IT-Solutions]

  2. Anonymous

  3. Anonymous

    I have attempted to do this in Jira 4.3 although it is not working. The priority field is not being hidden and the priority is not being changed accordingly once the issue has been submitted. Is there anything else which I need to change or can I just chuck this code into any radio button field once I have modified in my ID?

    Here is my code once modified. The ID for my "Severity" field is 10527.

    1. Is this code will work for select list field ???

  4. Anonymous

    I have tried implementing this example in 4.3. with the customfield containing a '-' instead of a '_' in the end, but it is not working. Any recommendations?


    Velina Urdova

  5. This article is a bit out-of-date and should be updated. Also, it seems SAC implements this solution differenty, and arguably, in an easier way.

    1. You don't need to create a seperate custom field. First, go the the Field Configuration for the project and Edit the Description of the Priority field with:


    2.  Make sure the Priority is visible on the Create Issue screen for your project.

    3. You're done. (smile)

  6. Hi Justin,

    I've tried this code and its working only at create screen, after putting the value in "Severity of Problem" field its been not reflecting in view screen. There showing same priority field with common values. Please suggest?

    Many thanks in advance.

    Sanu P Soman

  7. hey I tried using this code in the description, but it doesnt work for me? I am using JIRA 4.1.2 can anyone suggest if JIRA 4.1.2 supports this? Thanks

    <script type="text/javascript" charset="utf-8" id="priorityCustomFieldScript">   
    function setIssuePriorityAndSubmit(e)   
    // set the value of the priority field here:   
     {        document.getElementById("priority").selectedIndex = 0; 


    function hidePriorityAndAddSeverityHook()   
    {    var row = document.getElementById("priorityFieldArea"); = 'none';    


    var currentLocation = window.location.href;   
    if (currentLocation.indexOf('CreateIssue') > -1 || currentLocation.indexOf('EditIssue') > -1) {     


  8. Is there a way to do something similar to this in on demand?

    Maybe using post functions in the workflow. If a custom field is set to "Site down" then priority is set yo "Urgent"

  9. We are running:  JIRA v6.3-OD-06-017

    I would like to replace the priority with numbers such that each epic has stories that are prioritized numerically.

    Is this method the correct approach?

    thank you,


  10. Is this feature available on the cloud version of Jira?


    Ref: Setting Priority field value based on customfield value