It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to start (script runner ) custom groovy script post function?

BLD Sep 29, 2015

Hi all,

   I want start script runner - custom groovy script post functions, any one refer few links,



7 answers

3 votes
Jens Kisters Jun 12, 2016

I didn't find the adapavist docs very helpful.

This guide did the trick for me:

Judeb0y Sep 27, 2018

Agreed. The Adaptavist docs need some T.L.C. 

Nic Brough [Adaptavist] Community Leader Sep 27, 2018

I keep asking them for a new version.  There's an overhaul of the UI for SR coming and hopefully we'll be getting better docs with it.

My instinct is the docs are accurate, but written by developers for developers.  Not for beginners or even intermediate level users.  The example the team can't argue is below:

I go to look for stuff on writing a scripted conditions and it starts with 'what a condition is'.  That's fine.  There's then a massive chunk of text all about caching and the internals of Jira.  That's dreadful, because 99.99% of the people landing on this page need "here's a simple condition" next, not an essay that's utterly irrelevant to what they're trying to do!

Greg Elofson Oct 18, 2018

I think the utter disregard for useful documentation is what drives users to Power's that bad

1 vote
Nic Brough [Adaptavist] Community Leader Sep 30, 2015

I'm not sure what you mean by "start" in that question.

If you mean "start running a post function script", then you don't really.  You transition issues through the workflow so that the post functions are run by the system.  OR you can use the script console to run test scripts.

If you mean "get started with writing scripts for post functions", start at - loads of background, recipes and example code there!

0 votes
BLD Sep 30, 2015

Hi Andrew Boutin,

Thanks for reply, As you maintained link( is does't have any post functions, I have checked there.



0 votes
Nic Brough [Adaptavist] Community Leader Oct 01, 2015

That link goes to documentation on scripted post functions for me. What are you seeing?

0 votes
prudhvi godithi Nov 28, 2018

Hey is there a sample script in built in for confluence script runner plugin so that I can start modifying it, for attachment scan while uploading and stop them from uploading with a message if it has sensitive data ?

Nic Brough [Adaptavist] Community Leader Nov 28, 2018

No, because that would be out of context and not make that much sense.

The way to detect this won't work for you either - you can detect "attachment added" but it's too late by then - the attachment will have been uploaded.  You could scan and delete it, but that will mess your users around.

prudhvi godithi Nov 28, 2018

Thank you soo much, is it possible, once the attachment is uploaded to scan and then drop a comment on that space saying it has sensitive data, i have a script that scans the attachments, looking for a way to run it in groovy and call that shell script once the attachment is uploaded then scan it, if it has sensitive data then comment on the space with a random message. Is there a groovy way or some other way to start with this? To scan the attachment once uploaded and then comment with message in regards to remove that attachment.? 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

5,701 views 22 30
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you