Hi everyone,
I was trying to see if the Javascript I added was working. Creating an issue it was working perfectly, but when I try to "edit" the issue JIRA starts loading and never ends.
I tried to remove my JS from the announcement banner but still does not work. Tried to stop and start again JIRA service but still nothing. Do you have some idea about what could be?
With bugzilla I tracked this error:
[15:51:17.590] Your are trying to create a ToggleBlock with selector '.toggle-trigger'.One already exists with this trigger so has been ignored.
[15:51:17.809] GET http://itrack-col.it/rest/helptips/1.0/tips [HTTP/1.1 200 OK 47ms]
[15:51:19.855] GET http://itrack-col.it/rest/com.atlassian.translations.inproduct/1.0/translate/initdata?_dummy=1369835477633&_=1369835477634 [HTTP/1.1 200 OK 62ms]
[15:51:19.856] GET http://itrack-col.it/secure/SetSelectedIssue.jspa?atl_token=BBD4-FJKD-PQO1-86Y9%7C5cf59fe06b2dd748393969cf836e35eea3fb0657%7Clin&selectedIssueId=10908&nextIssueId=FGCC-89&selectedIssueIndex=19&_=1369835477649 [HTTP/1.1 204 No Content 62ms]
[15:51:19.856] GET http://itrack-col.it/secure/EditAction!default.jspa?decorator=none&issueId=10908&_=1369835477664 [HTTP/1.1 200 OK 109ms]
[15:51:20.135] GET http://itrack-col.it/rest/com.atlassian.translations.inproduct/1.0/translate/strings?_dummy=1369835477833&_=1369835477834 [HTTP/1.1 200 OK 62ms]
[15:51:20.136] POST http://itrack-col.it/secure/QuickEditIssue!default.jspa?issueId=10908&decorator=none [HTTP/1.1 200 OK 46ms]
[15:51:20.156] TypeError: C[0] is undefined @ http://itrack-col.it/s/it_ITuoei1j-418945332/850/289/fd8990274d6b1eae80eb4ef6941367f4/_/download/contextbatch/js/jira.view.issue,atl.general,jira.global/batch.js:626
Does a CTRL+SHIFT+R help? A cached javascript may be?
It was a good idea Renjith, but unfortunately didn't work. Do you have some other idea?
How did you add your javascript? In the announcement banner only?
Is your announcement banner now completely empty? Have you done a view source to make sure your web page doesn't have an old version?
Does any of your fields of the Edit Screen have JS attached?
Initially I put some Javascript in the "description" field of some customfield but I'm confident I removed it. There is some fast way to check if all the code is removed without opening again all the "description" in the different customfields and different configurations?
Anyway the Javascript I injected is the following:
<script type="text/javascript"> AJS.$(document).ready(function($) { CustomFieldsJS(); JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) { CustomFieldsJS(); $('input[type=checkbox]').each(function() { this.checked = false; }); }); function CustomFieldsJS() { //Control multicheckbox AJS.$("#customfield_10106-5").change(function() { var Tutti= AJS.$("#customfield_10106-5").is(':checked'); if(Tutti===true){ AJS.$("#customfield_10106-1").prop("checked",false); AJS.$("#customfield_10106-2").prop("checked",false); AJS.$("#customfield_10106-3").prop("checked",false); AJS.$("#customfield_10106-4").prop("checked",false); AJS.$("#customfield_10106-6").prop("checked",false); AJS.$("#customfield_10106-7").prop("checked",false); AJS.$("#customfield_10106-1").attr("disabled", true); AJS.$("#customfield_10106-2").attr("disabled", true); AJS.$("#customfield_10106-3").attr("disabled", true); AJS.$("#customfield_10106-4").attr("disabled", true); AJS.$("#customfield_10106-6").attr("disabled", true); AJS.$("#customfield_10106-7").attr("disabled", true); } else { AJS.$("#customfield_10106-1").attr("disabled", false); AJS.$("#customfield_10106-2").attr("disabled", false); AJS.$("#customfield_10106-3").attr("disabled", false); AJS.$("#customfield_10106-4").attr("disabled", false); AJS.$("#customfield_10106-6").attr("disabled", false); AJS.$("#customfield_10106-7").attr("disabled", false); } }); AJS.$("#customfield_10106-6").change(function() { var PostaTele= AJS.$("#customfield_10106-6").is(':checked'); if(PostaTele===true){ AJS.$("#customfield_10106-1").prop("checked",false); AJS.$("#customfield_10106-2").prop("checked",false); AJS.$("#customfield_10106-3").prop("checked",false); AJS.$("#customfield_10106-4").prop("checked",false); AJS.$("#customfield_10106-7").prop("checked",false); AJS.$("#customfield_10106-1").attr("disabled", true); AJS.$("#customfield_10106-2").attr("disabled", true); AJS.$("#customfield_10106-3").attr("disabled", true); AJS.$("#customfield_10106-4").attr("disabled", true); AJS.$("#customfield_10106-7").attr("disabled", true); } else { AJS.$("#customfield_10106-1").attr("disabled", false); AJS.$("#customfield_10106-2").attr("disabled", false); AJS.$("#customfield_10106-3").attr("disabled", false); AJS.$("#customfield_10106-4").attr("disabled", false); AJS.$("#customfield_10106-7").attr("disabled", false); } }); AJS.$("#customfield_10106-7").change(function() { var SMSMail= AJS.$("#customfield_10106-7").is(':checked'); if(SMSMail===true){ AJS.$("#customfield_10106-1").prop("checked",false); AJS.$("#customfield_10106-2").prop("checked",false); AJS.$("#customfield_10106-3").prop("checked",false); AJS.$("#customfield_10106-4").prop("checked",false); AJS.$("#customfield_10106-6").prop("checked",false); AJS.$("#customfield_10106-1").attr("disabled", true); AJS.$("#customfield_10106-2").attr("disabled", true); AJS.$("#customfield_10106-3").attr("disabled", true); AJS.$("#customfield_10106-4").attr("disabled", true); AJS.$("#customfield_10106-6").attr("disabled", true); } else { AJS.$("#customfield_10106-1").attr("disabled", false); AJS.$("#customfield_10106-2").attr("disabled", false); AJS.$("#customfield_10106-3").attr("disabled", false); AJS.$("#customfield_10106-4").attr("disabled", false); AJS.$("#customfield_10106-6").attr("disabled", false); } }); //Control cascading select AJS.$("#customfield_10700").change(function() { var val= AJS.$('#customfield_10700 :selected').text(); if(val != "None" && val != "Please select..."){ AJS.$('#customfield_10700\\:1 :nth-child(2)').remove(); AJS.$('#customfield_10700\\:1 :nth-child(2)').attr('selected', 'selected'); } }); //Control cascading select AJS.$("#customfield_10200").change(function() { var val= AJS.$('#customfield_10200 :selected').text(); if(val != "None" && val != "Please select..."){ AJS.$('#customfield_10200\\:1 :nth-child(2)').remove(); AJS.$('#customfield_10200\\:1 :nth-child(2)').attr('selected', 'selected'); } }); } }); </script> <script type="text/javascript"> (function($) { AJS.toInit(function(){ // init on load AJS.$("#qf-field-picker-trigger").hide(); AJS.$("#jira-help").hide(); AJS.$("#upm-requests").hide(); AJS.$("#fragunresolvedissuesbypriority").hide(); AJS.$("#fragunresolvedissuesbycomponent").hide(); AJS.$("#labels-heatmap-panel-panel").hide(); AJS.$('#customfield_10700 :nth-child(2)').remove(); AJS.$('#customfield_10700\\:1 :nth-child(2)').remove(); AJS.$('#customfield_10200 :nth-child(2)').remove(); AJS.$('#customfield_10200\\:1 :nth-child(2)').remove(); //AJS.$('#customfield_10700\\:1 :nth-child(2)').attr('selected', 'selected'); }) JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) { // init on refresh AJS.$("#qf-field-picker-trigger").hide(); AJS.$("#jira-help").hide(); AJS.$("#upm-requests").hide(); AJS.$("#fragunresolvedissuesbypriority").hide(); AJS.$("#fragunresolvedissuesbycomponent").hide(); AJS.$("#labels-heatmap-panel-panel").hide(); AJS.$('#customfield_10700 :nth-child(2)').remove(); AJS.$('#customfield_10700\\:1 :nth-child(2)').remove(); AJS.$('#customfield_10200 :nth-child(2)').remove(); AJS.$('#customfield_10200\\:1 :nth-child(2)').remove(); //AJS.$('#customfield_10700\\:1 :nth-child(2)').attr('selected', 'selected'); }); })(AJS.$); </script>
I did some other test and in the end I think that javascript is not related with the problem of the edit functionality. Somebody have some idea about what coul be? I'm going crazy trying to solve it.
It looks like you're new here. Sign in or register to get started.