Fetch Data from RIADA Insight and put it into a JIRA Service Desk custom field

Thomas Scheibelhofer October 13, 2017

Hi everyone,

probably I'm not the first person to ask this, but I couldn't find similar question.

Q: How can i fetch data from Insight based on User-input (selected Object(s) on the Service Portal) and fill fields for the next transition with that data.

Does anyone have any post-function (script-runner) examples?

The Insight post functions let me get data and put it into a field, but only Text-based ones, which doesn't help me here.

Sadly, i don't really have any useable scripting knowledge in Java or Groovy.

My use case:

I'd like to depict a 'Hardware request workflow' (which is basically just a rinse and repeat workflow for anything) and to keep it manageable and flexible it should access data from Insight.

Relevant Insight Object types:

1. Notebooks (as a sub-type of "Available hardware" - for purchases in this case)

  • Relevant Attributes:
    • Approver1, Approver2, Approver3
    • Notebook type, etc.

I have not yet figured out if I can use these fields with variables, since actually the Approvers should vary based on the User who puts in the request, so i'd like to have something like Approver1 = ${Cost Center Manager}  or Approver1 = User.${Cost Center Manager} 

Not sure if Insight has that functionality or i'm just thinking too complicated.

2. Users

  • Relevant Attributes:
    • username, email, etc.
    • Cost Center Manager (which in turn is another user)

 

Here's a quick and dirty diagram of what i'm trying to achieve and a jira workflow of how i imagine things to go down:

Request workflow.png

Jira workflow.png

I'm grateful for any tips, thanks and best regards

Thomas

 

2 answers

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.
October 16, 2017

Hi Thomas,

If I understand your use case, based on an Insight object, you want to set an Approver, is that correct? 

This would require some groovy scripting, and I can give you some guidelines

At https://documentation.riada.se/display/ICV50/Insight+Post+Functions we have documentation on what Insight post functions that we have support for out of the box. One of them is to execute groovy script, and we have some examples of them at https://documentation.riada.se/display/ICV50/Post+Functions+-+script+examples which could be used as an inspiration.

As an example, if you want to access an attribute of the selected object, this example can be used as an inspiration: https://documentation.riada.se/display/ICV50/Update+object+attribute

For more information on what is available in our API, take a look at our documentation at https://documentation.riada.se/display/ICV50/Insight+-+for+developers

If you want to set approver based on any of those attribute, you would have to look inte JIRA:s API for how to set the approver.

If this task feels daunting, we have some partners that can help you with your configuration and setup. More information can be found at https://riada.se/partners/

Best Regards
Alexander

Thomas Scheibelhofer October 19, 2017

Hi Alexander,

thank you - I've gone through all of the articles already before writing this question. With the little understanding of Groovy scripting i have, they didn't help me much i'm afraid.

I'll probably be left with 2 choices, get internal resources with Groovy Scripting capabilities or get an external partner, as you suggested.

Possibly some customers or partners who already have workflows like these in production could add them to your knowledge bases. E.g. Valiantys

I realize that that's probably their business model and they wouldn't just give out that sort of intelligence, but one can hope ;-)

Best regards

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.
October 19, 2017

Thanks for the update. Yes I think you are on the right track with any of these approaches. 

Let us know if you want to get in contact with one of our partners as we can help initiate the contact.

Best Regards
Alexander

0 votes
Thomas Scheibelhofer October 13, 2017

How this would look on the Service Portal:

image.png

Based on that input (+ Cost center manager) i want to do the approvals. 

Here's what kind of fields my users currently have:

image.png

BR

Thomas

Suggest an answer

Log in or Sign up to answer