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 votes
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 Oct 31, 2018 in Marketplace Apps

Marketplace Spotlight: Zephyr

Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...

348 views 0 1
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