Hello,
I installed the Intellij IDEA and try to debug a script.
The script imports the following Jira packages:
com.atlassian.jira.bc
com.atlassian.jira.component
com.atlassian.jira.user
Can anyone advise how to download these packages?
Thanks.
Yacob Hassidim.
Hi Yacob,
For IntelliJ you can add the jira-api.<version>.jar file to your project libraries.
You can find this in the Jira installation folder at <JIRA_HOME>/atlassian-jira/WEB-INF/lib
Hello,
Thank you.
I added it to Global Libraries and the "import" classes were succeeded.
As you understand I am beginner on Jira script.
Can you please help me for another issue?
I try to run (debug) the script from Intellij and each Jira API failed.
For example the following API:
def searchRequestService = ComponentAccessor.getComponent(SearchRequestService.class)
Ended with the following error message:
Caught: java.lang.NoClassDefFoundError: com/atlassian/plugin/PluginAccessor
Can you please advise?
Thanks again.
Yacob Hassidim.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You cannot debug or run your scripts outside of Jira. These can only be executed inside a running Jira application in order to access the running components exposed by the application.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Gareth,
Thank you.
Do you mean I must to install the ScripRunner to use Groovy script?
Yacob Hassidim.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you will need to have ScriptRunner installed in order to run Groovy scripts within Jira.
=EDIT=
If you want to script outside of Jira, you can use Jira's REST API to get the data, however, you will not be able to use the Java API in this case.
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.
Hello Gareth,
Thank you for your edit about REST API.
Can you please advise me more about REST API and if you can send me a little Groovy script with REST API that access to Jira?
Yacob Hassidim.
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.