In jira 4.0.2, we have a js file that is called on load of issuesummary.jsp file to do some specific operations on the description section of issue. I tried the same in jira 4.4.4 by inlucding the js statements in issuesummary.jsp file but it is not working. Can you please suggest what needs to update in order to call that js from that jsp file?
Thanks in Advance.. Srinivas
Hi Srinivas,
I'm afraid the JS is put a in place where the DOM tree has not been load yet. I suggest you to put the code into a document ready handler like in this snippet
<script> (function($){ $(document).ready(function(){ // do something with description field }); })(AJS.$); </script>
I'd also recommend to avoid changing system jsp's but put this code into the description of the system field 'description'. Use your own field configuration (scheme) for that. That way JIRA updates are with less effort for you.
Dieter
Hi Dieter,
Thanks for your reply but i treid other way. I included the js script tag in header.jsp file and then it worked. As the other pages also got effected, i removed the script tag from the header.jsp and added it to issuesummaryblock.vm file since i want the js function to be called only on the onload of issue summary view. It is working now as required :)
Do you suggest any other way for handling this requirement?
-Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dieter, If i add the code to the system banner, it will work but the javascript will be executed on the onload of all pages which may cause disturbance to other pages. The reason because the javascript is executing during the issue edit also which is not actually required. Hence i added to issuesummaryblock.vm file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. Even i thought of configruing a web-resource plugin module but it is strange that even with a simple html script tag i am able to access the javascript file. Since my purpose of execution of js on the onload of vm file is solved, i am continuing with the same solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.