Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira garbage collecter error due to my java script plugin?

Suresh December 1, 2015

I have developed JIRA java script plugin.we are suspecting GC error due to my java script plugin.

Can any tell me,Is my below script is correct syntax?

jQuery(document).ready(function($) {
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
         callFunction();
      
    });
        callFunction();
    
 function callFunction(){
 
    $('#customfield_12720-1').click(function(){
  
                  MessageApprover = document.getElementById('customfield_12721');
      notifyMsgApproval = document.getElementById('customfield_12722');
         if(document.getElementById('customfield_12720-1').checked){
     MessageApprover.value = AJS.params.loggedInUser;
    notifyMsgApproval.value='Message Integration Change Security Group';
   }
   else{
     MessageApprover.value ='';
   }
  
    }); 

   $('#customfield_11013-1').click(function(){
  
  ReqCompleteAprrover = document.getElementById('customfield_13103');
  if(document.getElementById('customfield_11013-1').checked){
  
   ReqCompleteAprrover.value = AJS.params.loggedInUser;
   }
   else{
   
   ReqCompleteAprrover.value ='';
   }
  
  
});
      if($('#issue-workflow-transition-submit').val() =='Qualification Approval'){
           epicQulificationApprover = document.getElementById('customfield_13006');
     epicQulificationApprover.value = AJS.params.loggedInUser;               
  
   }
   if($('#issue-workflow-transition-submit').val() =='Requirements Complete'){
     epicRequirementsComplete = document.getElementById('customfield_10604');
     epicRequirementsComplete.value = AJS.params.loggedInUser;               
  
   }
   if($('#issue-workflow-transition-submit').val() =='Requirements Approval'){
           epicRequirementsApproval = document.getElementById('customfield_13103');
     epicRequirementsApproval.value = AJS.params.loggedInUser;               
  
   }
  
   
}
});

 

Best Regards,

 

 

 

 

 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Volodymyr Krupach
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.
December 1, 2015

Does you script do any requests to the server? If no then it should not be a reason of GC errors.

Best bet is just to disable your addon and see if errors are still spawn.

0 votes
Suresh December 1, 2015

I think we are not calling server, the above code only one source file in the plugin.

The GC error will coming every day 3 to 5 times, but not in exact intervals.

 

Volodymyr Krupach
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.
December 1, 2015

If you do not call the server then JavaScript has nothing to do with GC errors. How did you add the JavaScript? Is part of your custom addon? Are there any server Java code in your addon?

Suresh December 1, 2015

As part of the add-on by using web-resource tag in attlasian-plugin.xml

Suresh December 1, 2015

I am suspecting AJS.params.loggedInUser may call the server?can you let me know,if I am wrong.

Suresh December 1, 2015

Or.I have seen the log and suspecting the GC issue due to following Exception. 2015-12-01 07:38:44,525 http-bio-443-exec-153 ERROR anonymous 458x21543x1 - 172.30.14.78 /rpc/soap/jirasoapservice-v2 [axis.encoding.ser.BeanSerializer] Exception: java.lang.IllegalArgumentException: The char '0xb' after 'Hi . i did the Analysis and found.: there is a data miss match between Production DB and Prepod DB select * from tz_orgpreftype' is not a valid XML character. May to resolve this exception? Thanks for the help.

Volodymyr Krupach
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.
December 1, 2015

To identify if the addon causes the problem just disable it. Concerning DB - restore the copy from the production.

Suresh December 1, 2015

Ok, the plugin have some functionalities ,it will effect the users work. can we do in the week ends and check.? Concerning DB - restore the copy from the production.(not exactly getting)

Volodymyr Krupach
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.
December 1, 2015

Nevermind about the DB restoring. I though you are staging environment and miss some data from the production database.

Suresh December 3, 2015

we are trying to disable this plugin, to see this GC error due to the above script.

TAGS
AUG Leaders

Atlassian Community Events