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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

77 views 0 5
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