I do realize that I can run it in the Script Runner console - and it does work as intended when running it there.
But how do I add it as a post function?
I don't think the documentation I've stumbled across so far covers this very well.
The use-case is:
When a user creates a new story in JIRA, a confluence page with the key + Task number(KEY-10) as a header is created.
How do I add that as a postfunction in the JIRA workflow? If there's a simple step-by-step guide somewhere.
Appreciate the help!