Custom JS existing on description of custom field is simply showing as description on screens. Existing functionality was broken on Create Issue screens. Is there any workaround?
Remove JS from description and copy it as a JS file. Now call the custom JS file from announcement banner. it works.
Good approach. Exactly the same we did already since a few years and hence it - luckily - saved us during the update to JIRA 6.4.11 :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @srinivas
Looks like a promising solution. Can you please post an example of how I can call teh custom JS from announment banner?
I have the sample script here, which change sthe value of one custom field depending on other field's value. This once doesn't worked when the JS placed in Description.
"<script type="text/javascript">
appName = document.getElementById('customfield_14262');
target = document.getElementById('customfield_14261');
if (appName=="Bergen.Service) {
target.value = "bergen service"
}
</script>"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We disabled this on purpose: https://confluence.atlassian.com/display/JIRA/Fields+Allowing+Custom+HTML+or+JavaScript You can use a plugin to deliver custom JS if you need to.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like the website was down so I am not sure what it was on the mentioned page. Can we enable this again? One question: Cant we use JS on any existing JSP pages or on Announcement Banner?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Boris, I tried many times but the site is down. Could you please point any other page if that was available?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The site is not down, I just tested it. I would suggest trying to access it from a different connection? Or maybe something is busted with your Atlassian ID account, try viewing it in an incognito window.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Boris, I am able to access the site on different browser. Could you please provide some more details about plugin to deliver custom JS?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We have custom JS on some of description fields, actually copies reporter user field value to some custom fields. Could you please suggest any workaround to achieve this functionality?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You would need to write a standard P2 (not connect) JIRA plugin to inject Javascript. I am not familiar with the exact how to for this as I am not a dev, but I know this is how we deliver custom JS on some of our instances. The only workaround I have is to do this via post functions where you can, and write a custom plugin to inject JS where you can't.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post functions does not help us since we need to call the JS on page load of Issue Create.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is what you would use to load JS: https://developer.atlassian.com/jiradev/jira-architecture/building-jira-add-ons/jira-plugins2-overview/jira-plugin-module-types/web-resource-plugin-module Some Googling around says https://marketplace.atlassian.com/plugins/de.communardo.atlassian.plugins.cute may also do this, but I don't know for sure. Would be important to trial and test first to see if it can help you inject the JS where you need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Boris, I got a simple work around. Now custom JS is also calling from announcement banner. I was not able to call JS on Create Issue dialog with the earlier versions from announcement banner but on JIRA 6.4 it is working. Thanks for sharing the links.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.