Documentation for JIRA 6.4 EAP. Not using this? See below:
(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.

Please note some of the below items are no longer available from JIRA 6.2.x onwards.

There are several ways to inject JavaScript or HTML into JIRA:

  1. Edit the custom field's description. See Displaying a Field Based on Another Field Selection as an example.
  2. Add JavaScript to the header, by modifying a JSP from the file system. See Adding JavaScript to all pages for Google Analytics as an example.
  3. You can add HTML or Javascript in the Announcement Banner.
  4. Edit the field description in the Field Configuration.

 

  • No labels

8 Comments

  1. #1 and #4 do not work with 6.2 and above. See: JRA-37576

    1. Hi Ron K,

      You are quite correct. We are currently reviewing our FAQs. I've updated this page to reflect it is only valid to JIRA version earlier than 6.2. Apologies for the inconvenience. 

      Thanks,

      Warren

  2. Guys, don't forget to add you comments to ticket  JRA-37576 - Jira 6.2 breaks javascript in description of user-picker fields Resolved  – closing it as Won'tFix will break lots of functionality and flexibility in JIRA. It's normal to assume that JIRA Admins do know what to put inside the field descriptions. Also there are 3rd party plugins that do keep important data there, like iDalko Table Grid one.

  3. Hi, I want to show a field based on value of other field. I am not sure how would I achieve this use case in JIRA 6.2.3. I am using Behaviours plugin in my current version and it is not supported in 6.2.3. Most probably due to the same reason above.

    Please HELP!!!!

  4. Is there a planned fix for this in anything above 6.2? Maybe  6.3?

  5. For me this only seems to be a problem with the single user picker custom field in v6.2.7.

    I have a Javascript in the field description that shows a image and when the image is clicked more description text is shown.

    1. I've solved my issue with 6.2.7 and the Single User Picker custom field.

      Edit
      C:\Program Files\Atlassian\JIRA\atlassian-jira\WEB-INF\classes\templates\plugins\fields\edit\edit-userpicker.vm
      And at the start of the file add
      #disable_html_escaping()
      Javascript rendering now works for me. Thanks goodness.
      (It seems the userpicker vm was missed for this update, all other vms in that directory have that call included)

  6. Thank you for the solution, Dalectric.