Need help creating confluence page based on value in a custom field Edited

My goal is to make a confluence page when someone sets a custom field to a particular value, i.e. create a troubleshooting document.

I have JIRA Version 7.3,  ScriptRunner 5.0.14, and Confluence 6.1.3

I'm trying to combine the examples below to run under a script listener for when the a jira is created or updated.

At this point in time I have made a mess of things and no page is created. Any tips or code to share would be appreciated. 



**Updated with errors 8/14

This is what I am getting back, although I was underthe impression I can ignore these.  

There was an error during the execution of your script

Compilation error(s):
Script1.groovy: 9: unable to resolve class
 @ line 9, column 1.
Script1.groovy: 12: unable to resolve class groovy.json.JsonBuilder
 @ line 12, column 1.
   import groovy.json.JsonBuilder
Script1.groovy: 4: unable to resolve class com.atlassian.applinks.api.ApplicationLinkService
 @ line 4, column 1.
   import com.atlassian.applinks.api.ApplicationLinkService
Script1.groovy: 11: unable to resolve class
 @ line 11, column 1.
Script1.groovy: 10: unable to resolve class
 @ line 10, column 1.
Script1.groovy: 8: unable to resolve class
 @ line 8, column 1.
Script1.groovy: 5: unable to resolve class com.atlassian.applinks.api.application.confluence.ConfluenceApplicationType
 @ line 5, column 1.
   import com.atlassian.applinks.api.application.
confluence.ConfluenceApplicationType ^ Script1.groovy: 3: unable to resolve class com.atlassian.applinks.api.ApplicationLink @ line 3, column 1. import com.atlassian.applinks.api.ApplicationLink ^


I tried the sample script in the Script Runner Script Console and got the following error


No such property: issue for class:


groovy.lang.MissingPropertyException: No such property: issue for class: at


017-08-18 14:30:22,247 WARN [common.UserScriptEndpoint]: Script console script failed: groovy.lang.MissingPropertyException: No such property: issue for class: at

0 answers

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 Apr 10, 2018 in Marketplace Apps

Learn about how Stefan K. built one of the *first ever* Marketplace apps

In this post you will discover more about the evolution of K15t software, some big topics they're currently focusing on in the app space, and a rare (not not funny!) photo of founders Mike Cannon-Bro...

13,083 views 11 24
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