Custom Field Description Caching

Hello,

I'm having a problem with some java script that we've added to two custom fields. The java script has been updated in the description section of the custom field under the administration section. I've double checked and the new script version is definitely in place but the script is not actually available on the page when I log a new ticket or update an existing one. I have cleared all the browser cache, restarted everything including the Jira server and performed a full re-index and it is still all cached.

The same behaviour is exactly the same if I remove the description entirely and add some other artibrary text into the field.

Please help because it's having a major impact on our support team at the moment.

Thanks, Dominique

5 answers

Is your problem that your Javascript is appearing in the HTML source but it’s not running the way you expect it to, or is your problem that you’ve entered the Javascript in the description, but it’s not appearing in the HTML source (and hence is not running.)

If it’s the former, then you’re going to have to debug the Javascript. If you’re on Jira 5.0, you’ll also want to take a look at https://developer.atlassian.com/display/JIRADEV/Custom+Fields+that+use+CSS+or+JavaScript+Web+Resources+in+JIRA+5.0 and pay particular attention to the part about the <tt>JIRA.Events.NEW_CONTENT_ADDED</tt> event.

If it’s the latter, then the problem might be that you need to update the field defintion under the “Field Configuration” section instead of the “Custom Fields” section. The description you enter on the “Field Configuration” section appears below the field when issues are created or edited and takes precedence over the one you entered on the “Custom Fields” section. That’s bitten me before.

Hi Cedric,

Unfortunately its the latter: The old version of our JS is not appearing in hte HTML source.

I initially thought it was cached in the browswer, but cleaing the browser cache didn't make any difference. Then thought it might be a re-indexing issue that also didn't help. Tried finding where the Tomcat cache was and cleared that but the results are still the same. To clear the Tomcat cache, I shutdown Jira, removed everything under /opt/atlassian/jira/work and restarted Jira. Unfortunately the results are still the same.

The same behaviour exists if I completely remove the JS from the field description. The old JS is still reflected in the HTML source.

Thanks for the quick reply.

I don’t think it’s a caching issue. This definately sounds like you’re editing the description in the “Custom Field” section when you should be editing the description in the “Field Configuration” section. There’s more than one place in the administration section where you can edit the description! Check to make sure that you have changed the appropiate “Field Configuration” section.

I’d be more specific about how to get there, but the interface changes with practically every version of Jira, and your version might be different from mine.

Hi Dominoque,

Go to the field configuration scheme associated to the project and then go to the field configurations of the issue types. Open the field configuration and go to the particular field in who description you have pasted the script. Click on Edit against the field, empty the previous contents (here you will see your old script) i.e. make it blank and save it. This'll pull the latest description (JavaScript in your case) that you have given in the Custom Field description in Admin section and update in the field configuration. You will then see your new script is getting displayed.

~Pranjal Shukla

Do you have a field configuration? Please check the description there

The script is in the description field of the custom field configuration. I've checked in the Admin section and in the actual database table. The new version of our script is definitely in place. It is just now shown on the actual page when a new ticket is logged or an existing ticket is updated. The old version of the JS is still part of this page.

thanks for the quick response.

Thanks Cedric,

This is exactly what I was doing. Thanks for the assistance this has helped a lot!

All the best,

Dominique

That's what i had suggested in my answer ;)

Hello Pranjal,

Thank you for your prompt and helpful response. This is the issue I was having:

Editing the description under custom field section instead of under the field configuration section.

Appreciate the help.

Dominique

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

467 views 7 5
Join discussion

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