Anyone know where to find a tutorial on script runner? It looks like exactly what we need but being new to JIRA.
I find this tutorial quite helpful: http://igorpopov.io/2014/11/24/rocking-with-jira-script-runner/
now I am opening above link, but page does not exist, anybody can help me?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's nearly 3 years old, and people have moved on. Have a look at the SR docs and search this community for what you're trying to achieve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nic Brough ,
Thanks for reply,
Now I am able to looking script runner in jira.
But I need help for the retrieve issue id using scriptrunner
Could you please help me when you get free time
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How you retrieve an issue id depends on where you are running the script. If it's in the console, you'll need to use an issueManager to fetch the issue. If you're in a transition then the object simply called issue is immediately available to your scripts, and so-on.
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.
https://scriptrunner.adaptavist.com/latest/index.html will take you to the relevant docs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Look
https://scriptrunner.adaptavist.com/latest/jira/scripted-fields.html#_scripting
see a couple of bindings (quick starting points) could be used in different scenarios
It would be nice to have a table of what bindings I can use in different scenarios
Console these bindings
Built-in scripts: these bindings
Transition scripts: these bindings
Scripted fields: these and so on
It's kind of painful to learn from other people scripts and mostly it's a guesswork
For example, Scripted Fields does not mention that issue is available as a binding. Perhaps it is obvious, but a clear map of what binding(shortcuts) are available where would be probably the most popular page on Adaptavist web site.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Michal, but I was looking for something a bit more basic (Start me with a hello world :). Being new to JIRA, I do not even know where to start. I started writing plugin but that will take some time and to solve the immediate need of having a script that will automatically put the project into the correct component. Cheers...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I try to run any example I get every line as an error: Error!startup failed: Script1.groovy: 1: unable to resolve class ComponentManager @ line 1, column 18. ComponentManager componentManager = ComponentManager.getInstance() ^ Script1.groovy: 2: unable to resolve class User @ line 2, column 6. User remoteUser = componentManager.getJiraAuthenticationContext().getUser() ^ Script1.groovy: 3: unable to resolve class MutableIssue @ line 3, column 14. MutableIssue issue = componentManager.getIssueManager().getIssueObject("DTT-1757") ^ Script1.groovy: 4: unable to resolve class Project @ line 4, column 9. Project project = issue.getProjectObject() ^ Script1.groovy: 5: unable to resolve class Version @ line 5, column 9. Version version = componentManager.getVersionManager().getVersion(project.getId(), "1.2") ^ Script1.groovy: 6: unable to resolve class ProjectComponent @ line 6, column 18. ProjectComponent component = componentManager.getProjectComponentManager().findByComponentName(project.getId(), "MyComponent") ^ Script1.groovy: 11: unable to resolve class ActionResult @ line 11, column 14. ActionResult aResult = CoreFactory.getActionDispatcher().execute(ActionNames.ISSUE_UPDATE, actionParams); ^ 7 errors
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you trying to do this in confluence, or was that just a "tagging failure"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Assuming you did mean jira, seems like you are missing an import: import com.atlassian.jira.ComponentManager
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jamie, and yeah I am doing 100 things on both JIRA and confluence. This is a JIRA thing, apologies. OK yeah that is why I really would like a how to like the develop your own plugins. Thanks I will try that (tomorrow as it is late in the East :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK That fixed the first line error, I probably just need more imports as I just copy pasted: https://jamieechlin.atlassian.net/wiki/display/GRV/Post+Functions#PostFunctions-SetAffectsVersions,FixVersionsorComponents which has no imports. It may help users if you post the imports in that block of code just like the other ones have. Just my two cents...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Paul DeSousa Did you find that tutorial? I would be really useful this time for me, thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.