What classes to import into script?

Jakub Hanak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 21, 2019

Hello Community, 

I am strarting to dig little bit deeper into JIRA/Confluence and I would like to start using ScriptRunner. I know basic concepts and I read the Adaptivist ScriptRunner documentation. My question is: How do you know what classes should be imported into particular script? Is there any list of all classes that could be used and when they should be used? 

Thank you,

Jakub 

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 21, 2019

This is not something we can simply list for you.  A script needs to import the classes that it is going to call, and there's no way we can know what classes any script you write might use.

Every line of code you put in a script *might* need a different import.

As for what you might import, start at https://developer.atlassian.com/server/jira/platform/java-apis/ and select the product (Core, Software or Service Desk).  When to import is harder to document, but really does come back to "when you need to use it"

Jakub Hanak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 21, 2019

Thank you @Nic Brough -Adaptavist-

I thought it´s not going to be that simple. 

Have a good day,

Jakub 

Suggest an answer

Log in or Sign up to answer