Javascript hidden field does not hide on JIRA 5.1, but is hidden on JIRA 4.0
Just wondering if it still should work in v5.1 i.e. I have javascript on a custom field (my javascript is in the description of the custom field), when I check the custom fields checkbox another field is displayed giving the user more options.
This works as expected in JIRA 4.0, but on my test install of 5.1.1 I see all options displayed on form load.
Maybe you can point me in the right direction, is it a config option on the new form? Any ideas why this is/would happening?
Background: I've just upgraded to v5.1.1 and migrated my v 4.0 database via an xml export/import.
Ta,
Hi, the way events and Javascript is handled has changed since JIRA 5.x. Please refer to https://developer.atlassian.com/display/JIRADEV/Custom+Fields+that+use+CSS+or+JavaScript+Web+Resources+in+JIRA+5.0 for more information.
Hi, the same applies. I gave a similiar example here for what it now should be - https://answers.atlassian.com/questions/79201/jira-5-1-2-questions-re-pop-up-issue-edit-window
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harry,
Thanks for the link, it refers to updating plugins that use customfields/JavaScript. My query was in relation to JavaScript placed in the description of a stock custom field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The penny drops... I see the reference to JIRA.Events.NEW_CONTENT_ADDED
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) {
AJS.$(
".myspecialfield"
, context).css(
"background-color"
,
"#8f8"
);
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It seems to work on issue creation, but only after the page has fully loaded, and it does not work on edit screen. It's a step in the right direction I suppose, thanks Harry.
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.