Community moderators have prevented the ability to post new answers.
I didn't find the adapavist docs very helpful.
This guide did the trick for me:
http://igorpopov.io/2014/11/24/rocking-with-jira-script-runner/
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think the utter disregard for useful documentation is what drives users to Power Scripts...it's that bad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 https://scriptrunner.adaptavist.com/latest/jira/quickstart.html - loads of background, recipes and example code there!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you go to https://scriptrunner.adaptavist.com/latest/jira/custom-workflow-functions.html#_post_functions, and then read what is there it gives a link to some examples - https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/postfunctions.html - in the page tree here you can see 3 different examples - https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/postfunctions/auto-close-all-subtasks.html, https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/postfunctions/append-generate-comment.html, https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/postfunctions/set-issue-attributes.html - I don't think you checked well enough.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That link goes to documentation on scripted post functions for me. What are you seeing?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrew Boutin,
Thanks for reply, As you maintained link(https://scriptrunner.adaptavist.com/latest/jira/custom-workflow-functions.html#_post_functions) is does't have any post functions, I have checked there.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.