Get started to create import item configuration

Antoine Berry
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 10, 2017

Hi,

I am currently creating an import for a great number of items (see example in attached file). Since there are a lot of them, I would like to find a way to automize the creation with a configuration file. 

I would like to export that configuration so I can copy it on other environments without having to create it manually. 

Is there a way to run groovy scripts of some sort to perform this ? I have been looking at the API and the TemplateImportConfiguration seems appropriate. However when I tried create an object it made Insight bug. And creating a plug-in is way too tedious at the moment.

Thanks for your help,

Antoine

image.png

 

2 answers

0 votes
Antoine Berry
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 13, 2017

Hi Alexander, 

Thanks for your answer. Do I need to use a plug-in to use this class, or can I simply run a script with scriptRunner to create my import configuration ? I have been trying to create a plug-in but it is not working and I can barely afford more time trying to accomplish that.

Thanks,

Antoine

Alexander Sundström
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.
November 14, 2017

You don't need to create a plugin for this class. Take a look at https://documentation.riada.se/insight/latest/insight-for-developers/insight-java-api where we have a Java Example of how to set up the imports in the code.

Best Regards
Alexander

Antoine Berry
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 15, 2017

Hi,

Could you please provide a procedure with a short example so I can get started ?

I have tried putting the insight-5.1.4 jar in .../atlassian-jira/WEB-INF/lib. This makes the insight classes available but disables Insight (since I tried to create an object using insight classes). I am then using script runner to run the script (GG -> Script console).

Alexander Sundström
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.
November 15, 2017

In the upcoming version of Insight 5.2, we've added a Script Console, that would enable you to simple paste groovy scripts and execute on the fly, you could use this to create the imports needed. As you access our facade through our add-on, you would not need to add any dependencies other than the import statements like in our groovy script examples.

5.2 is to be released shortly, but there is already a public beta version released, available at https://documentation.riada.se/display/ICV52/Insight+5.2+Release+notes

I think this beta version contains the mentioned added functionality, and its available at the add on section in Jira.

Best Regards
Alexander

0 votes
Alexander Sundström
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.
November 13, 2017

Hi Antoine,

There is an facade available for the Imports at https://insight-javadoc.riada.se/insight-javadoc-5.2/com/riadalabs/jira/plugins/insight/channel/external/api/facade/ImportSourceConfigurationFacade.html

Note that there isn't yet a version 5.2 version released, it's to be released within the next days, but the mentioned API is available in 5.1

Best Regards
Alexander

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events