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

0 vote
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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

180 views 0 4
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