1 answer
- 10-1
Hi Yaakov,
It is.
I'm actually today at Riada to cooperate on a similar case.
I will provide details in the course of the week.
- Yaakov Shamii
hi Francis, any update about it?
- user-3fd1a
I forget about this thread - thanks for the nudge
What I did is pretty straightforward - check the Riada documentation for some examples. For instance the case about 'Load object by key'
https://documentation.riada.io/insight/latest/load-object-by-key-29324684.html- Ensure that the insight is installed
- Copy the code and insert in the script at the appropriate place - you will have to massage it a bit
import com.atlassian.jira.component.ComponentAccessor; /* The object facade class */ Class objectFacadeClass = ComponentAccessor.getPluginAccessor().getClassLoader().findClass("com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectFacade"); /* The reference to the object facade which you can use in your code */ def objectFacade = ComponentAccessor.getOSGiComponentInstanceOfType(objectFacadeClass); /* Log the Insight object */ log.info("Insight object of key SCH-1: " + objectFacade.loadObjectBean("SCH-1"));
Bottom line - you can just use the Riada API in the scripts.
Let me know if this is sufficient.
- Anders Lantz
Hi Yaakov Shamii !
I work for the consultancy side of Riada (the makers of Insight), if you have any questions about Insight and it´s java API feel free to contact our support: https://support.riada.se/ and the Dev side of Riada will be happy to help you.
Or ping me here and I can have a look
By the way, have you had a look at the postfunctions of Insight? Maybe they can help you, for example "Create an Insight Object from a Jira Issue.". If you need more flexibility I believe solution is the way to go.
- Yaakov Shamii
Hi Anders Lantz, ,
I'm having some issues with updating insight custom field value via the sync rules (altought my code works from scriptrunner script console).
can you please have a look at the ticket I opened?
https://support.idalko.com/servicedesk/customer/portal/8/EASE-3304
Thanks a lot!
- Anders Lantz
Hi!
I don’t have access to the ticket (I work for Riada, not Idalko/exalate), but my guess is a permission problem.
You can try early in your script switching to an Admin user.def authContext = ComponentAccessor.getJiraAuthenticationContext()
authContext.setLoggedInUser(actingUser) - Yaakov Shamii
Hi Anders Lantz, Thanks for answering.
I'm using an administrator (and I also gave it manually permissions to the scheme I need). I can send you the code I use and the logs if it might help.
Add your comment...
Hi,
Is is possible to sync a JIRA custom field (like labels or text field) to another addon custom field (like insight objects)?
Thanks in advance.