Scriptrunner errors

Hi,

We have noticed such errors in logs related to script runner :

2016-02-24 09:23:50,627 ERROR [threadpool:thread-8] G04518271 *OH7VB2x563x665649x37 10.36.57.214,35.165.31.126 "POST /scm/pcb_gpt/gpt.git/git-receive-pack HTTP/1.1" c.o.s.b.
ScriptedSynchronousPostReceiveGlobalHook *************************************************************************************
2016-02-24 09:23:50,630 ERROR [threadpool:thread-8] G04518271 *OH7VB2x563x665649x37 10.36.57.214,35.165.31.126 "POST /scm/pcb_gpt/gpt.git/git-receive-pack HTTP/1.1" c.o.s.b.
ScriptedSynchronousPostReceiveGlobalHook Script post-receive hook failed: repository: gpt, file: null
groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup fai
led:
GStringTemplateScript1.groovy: 2: [Static type checking] - The variable [branch] is undeclared.
 @ line 2, column 104.
   sitory ${repository.name} - ${branch.nam
                                 ^

GStringTemplateScript1.groovy: 2: [Static type checking] - No such property: name for class: java.lang.Object
 @ line 2, column 103.
   ository ${repository.name} - ${branch.na
                                 ^

2 errors

        at com.onresolve.scriptrunner.canned.bitbucket.events.StashSendCustomEmail.doScript(StashSendCustomEmail.groovy:160) ~[na:na]
        at com.onresolve.scriptrunner.canned.bitbucket.events.email.StashSendCustomEmailPostReceive.super$2$doScript(StashSendCustomEmailPostReceive.groovy) ~[na:na]
        at com.onresolve.scriptrunner.canned.bitbucket.events.email.StashSendCustomEmailPostReceive.doScript(StashSendCustomEmailPostReceive.groovy:73) ~[na:na]

 

How can we fix this ?

 

Regards

Sakshi

1 answer

This widget could not be displayed.
Steven Behnke Community Champion Feb 26, 2016

Well... It looks like the script is at fault. Can you post the source? It's saying literally your variable is undeclared. This implies you're using a variable without declaring it.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

428 views 3 17
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you