Hi,
I just installed a tScript Runner and I have big problem. I'm not able to add a Behaviours (look on screenshot). I was cleared plugins cache and it's doesn't help.
Hi Tomasz
Can you go to the Manage add-ons page, find Scriptrunner, click it to expand the Scriptrunner section and then expand the section that says "xxx of xxx modules enabled"
Then check to see if the " Behaviour admin assets (bh-admin) " module is enabled or disabled?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tomasz
Do you see any errors in the Browsers Developer Console tab when you try to load the behaviours page?
Can you tell me the Scriptrunner version you installed and if you upgraded, please tell me from which version you upgraded?
Did you manage to create any behaviours before this issue happened?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Matthew,
I jus installed Script Runner, but I don't know full history of instalation this addon on this Jira instance. I checked and also can't add post-function, validators or conditions. I can only use Script Console, build-in scripts etc. When i load a behaviours page a have errors.
Data with key com.onresolve.jira.groovy.groovyrunner:directIdeaIntegration.idea-editor-data-provider has already been claimed
And
TypeError: $ is not a function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tomasz
I have seen this before when a user had a customised HTML banner with JavaScript in it.
Do you have custom JavaScript within your HTML banner?
If you do, does removing it temporarily bring back the behaviours?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matthew,
Yes I have custom JavaScript in HTML banner, but commented this script and doesn't help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you post the HTML banner with the JavaScript here?
If you still see the following error, even after commenting out the JavaScript it may still be trying to parse it when loading the behaviours.
TypeError: $ is not a function
You may also need to clear the browser cache to force it to get the new HTML code without the JavaScript in the header
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Matthew Clark here is my JS. I cleared cache and trying on another web browser but still doesn't work.
/*
<script language="JavaScript">
<!--
jQuery.noConflict( );
var defaultRoleName = "role:10001";
var roleSelected = false;
function changeCommentLevel( )
{
if ( roleSelected )
{
return;
}//if
if ( jQuery( '#comment' ).val() != "" )
{
// edition;
roleSelected = true;
return;
}
var commentLevelSelect = jQuery( '.security-level select#commentLevel option[value=\'' + defaultRoleName + '\']' );
if ( commentLevelSelect )
{
var labelText = commentLevelSelect.first( ).text( );
jQuery( "select#commentLevel" ).val( defaultRoleName );
jQuery( "#commentLevel-multi-select a.drop span.icon" ).removeClass( "icon-unlocked" ).addClass( "icon-locked" );
var htmlEscapedLabel = AJS.$( "<div/>" ).text( labelText ).html( );
jQuery( ".security-level span.current-level" ).html( AJS.format( AJS.params.securityLevelViewableRestrictedTo, htmlEscapedLabel ) );
roleSelected = true;
}
}
jQuery( '#comment' ).live( 'focus', changeCommentLevel );
//-->
</script>
<style>
.alertHeader
{display:none;}
</style>
*/
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tomasz
Can you confirm that you still see this error in the browser developer tools console log?
TypeError: $ is not a function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Matthew Clark,
Yesy, i still get this error:
Uncaught TypeError: $ is not a function
This:
Error parsing header X-XSS-Protection: 1; mode=block, 1; mode=block: expected semicolon at character position 13. The default protections will be applied.
And this:
batch.js?locale=en-US&spectrum=true:34 Data with key com.onresolve.jira.groovy.groovyrunner:directIdeaIntegration.idea-editor-data-provider has already been claimed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you still see the first error, it would indicate the banner is still being loaded.
Please can you edit your JavaScript banner and remove the following line:
jQuery.noConflict( );
Then clear your browser cache and let me know if you can then see the behaviours interface correctly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now it's working. Strange, why comment sign isn't recognized in banner?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matthew,
Same issue i'm facing.could you please help on this issue. find the attachments.
Problem:
1.When Script runner update 5.0.14 to 5.5.0 behaviors page not loading fully.
2.when role back to old version behaviors page loaded fully.
3. we are upgrading our jira version 7.1.10 to 7.11.0 this time facing the issue.
Thanks,
Hari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hari
Open the browser developer tools after loading the behaviours page which fails to load fully. You will need to show me any errors you get in the console log.
When this page fails to load it is often due to some JavaScript issue which usually logs to the browsers console log area.
--
I have also seen this when upgrading from a reasonably old version such as 5.0.14 to the most recent. I have not reproduce this here but the solution was to disable and re-enable scriptrunner.
Regards
Matthew
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matthew,
Yes,I removed script runner logs and disable the add on after that install new version but problems is not solved.Please see the error logs below.
1.Error
Data with key com.onresolve.jira.groovy.groovyrunner:directIdeaIntegration.idea-editor-data-provider has already been claimed
e.claim @ batch.js?locale=en-US&spectrum=true:34
r @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
(anonymous) @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
a @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
(anonymous) @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
a @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
(anonymous) @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
a @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
(anonymous) @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
a @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
(anonymous) @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
a @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
(anonymous) @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
a @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
(anonymous) @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
a @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
n @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
(anonymous) @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
(anonymous) @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
2. Error
Uncaught TypeError: $ is not a function
at Module.<anonymous> (com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4)
at a (com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4)
at HTMLDocument.<anonymous> (com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4)
at j (batch.js?locale=en-US&spectrum=true:66)
at Object.fireWith (batch.js?locale=en-US&spectrum=true:67)
at Function.ready (batch.js?locale=en-US&spectrum=true:55)
at HTMLDocument.Q (batch.js?locale=en-US&spectrum=true:65)
(anonymous) @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
a @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
(anonymous) @ com.onresolve.jira.groovy.groovyrunner:bh-admin.js:4
j @ batch.js?locale=en-US&spectrum=true:66
fireWith @ batch.js?locale=en-US&spectrum=true:67
ready @ batch.js?locale=en-US&spectrum=true:55
Q @ batch.js?locale=en-US&spectrum=true:65
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have the same error as the Original Poster.
Uncaught TypeError: $ is not a function
Can you check to see if you are using custom JavaScript within your page?
e.g. You may have custom JavaScript used to set a custom Banner
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matthew,
Thanks you,it's working fine.But what i'm put code in Banner that is most important us.could you please provide the solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would need to see the Javascript code to determine what part is causing the problem.
For example, the following line can cause this problem:
jQuery.noConflict( );
The reason for this is explained here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
see my code below
<script language="JavaScript">
<!--
jQuery.noConflict();
var defaultGroupName = "group:eMeter-ops-users";
var customRoleSelected = false;
function changeCommentLevel()
{
if (customRoleSelected) return;
var commentLevelSelect = jQuery('.security-level select#commentLevel option[value=\'' + defaultGroupName + '\']');
if (commentLevelSelect)
{ var labelText = commentLevelSelect.first().text(); jQuery("select#commentLevel").val(defaultGroupName); jQuery("#commentLevel-multi-select a.drop span.icon").removeClass("icon-unlocked").addClass("icon-locked"); var htmlEscapedLabel = AJS.$("<div/>").text(labelText).html(); jQuery(".security-level span.current-level").html(AJS.format(AJS.params.securityLevelViewableRestrictedTo, htmlEscapedLabel)); }
}
jQuery('#comment').live('focus', changeCommentLevel);
jQuery('#commentLevel-suggestions').live('click', function()
{ customRoleSelected = true; }
);
//-->
</script>
<style>
.alertHeader
{display:none;}
</style>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You also have
jQuery.noConflict();
Please remove that line, do not just comment it out.
Then clear your browser cache and try again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i don't have functional knowledge could you please modified my code based on your suggestion copy the comment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You just need to remove the one line between the <script> html tags. Don't change the code outside the script tags.
I have not tested it here so best try it on a test box first if you can:
<script language="JavaScript">
var defaultGroupName = "group:eMeter-ops-users";
var customRoleSelected = false;
function changeCommentLevel()
{
if (customRoleSelected) return;
var commentLevelSelect = jQuery('.security-level select#commentLevel option[value=\'' + defaultGroupName + '\']');
if (commentLevelSelect) {
var labelText = commentLevelSelect.first().text();
jQuery("select#commentLevel").val(defaultGroupName);
jQuery("#commentLevel-multi-select a.drop span.icon").removeClass("icon-unlocked").addClass("icon-locked");
var htmlEscapedLabel = AJS.$("<div/>").text(labelText).html();
jQuery(".security-level span.current-level").html(AJS.format(AJS.params.securityLevelViewableRestrictedTo, htmlEscapedLabel));
}
}
jQuery('#comment').live('focus', changeCommentLevel);
jQuery('#commentLevel-suggestions').live('click', function()
{ customRoleSelected = true; }
);
</script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please advise how this line(which we are commenting) is affecting the behaviour plugin that too only in JIRA 7.11 version and not on the current version? We need a root cause and solution without breaking our existing scripts in place.
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.