Custom Field Description Caching

Dominique dHotman May 29, 2012

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

1 vote
Pranjal Shukla May 29, 2012

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

1 vote
CEDRIC ZABEL
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 29, 2012

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.

Dominique dHotman May 29, 2012

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.

CEDRIC ZABEL
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 29, 2012

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.

Like Andreas Filler likes this
Andreas Filler April 21, 2020

Thank you very much 8 years later for letting me understand the difference. 👍 I was wondering why my changed descriptions are not visible in the views. :) 

0 votes
Dominique dHotman May 29, 2012

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

0 votes
Dominique dHotman May 29, 2012

Thanks Cedric,

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

All the best,

Dominique

Dieter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 29, 2012
That's what i had suggested in my answer ;)
0 votes
Dieter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 29, 2012

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

Dominique dHotman May 29, 2012

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.

Suggest an answer

Log in or Sign up to answer