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

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

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

0 votes

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

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

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 16, 2018 in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

1,385 views 17 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you