Hi All,
I found that Javascript code only triggered in second time in create Issue pop up. I mean javascripts that embedded in custom fields.
e.g
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) {
alert("Hello People");
});
Alert comes only in the second time onwards, when we click on create issue. Any feedback on this?
Hi Ishan,
you can try this link
https://answers.atlassian.com/questions/107997/facing-javascript-problem-while-migrating-from-jira4-4-to-jira5-x
I faced the same javascript issue and it got resolved.
Cheers,
Jayasingh
Hi Jaysingh,
That what I have done. Anyway thanks for the answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does this work?
AJS.$(document).bind('dialogContentReady', function(event, dialog){
alert('me');
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Renjith,
I tried this already, unfortunately not worked. at the end of the day I used like this,
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context, reason) {
$(document).ready(function(){
alert('me');
});
});
//Following line needed when first time create issue pop up loading on dashboard
$(document).ready(function(){
alert('me');
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the answer, I have done all those things already. but not worked. my problem happens only the first time when I click create issue. secong time onwards it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ishan,
I guess this might help : https://answers.atlassian.com/questions/47843/strange-javascript-problem-in-create-screen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@ishan : i updated my answer , please check again
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the answer, I have done all those things already. but not worked. my problem happens only the first time when I click create issue. secong time onwards it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ishan,
You need to hook into the show dialog event... so you put your code in:
AJS.$(document).bind(
'dialogContentReady'
,
function
(event, dialog) {
...
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Futhermore, this happens only on dashboard.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dipti,
nope, it did not work. I tried it already. my problem is my javascript code works in second time onwards. When I click on create issue in first time, it will not work and cancel the pop up and click on second time it will work
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.