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)
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
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:
I'm grateful for any tips, thanks and best regards
Thomas
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How this would look on the Service Portal:
Based on that input (+ Cost center manager) i want to do the approvals.
Here's what kind of fields my users currently have:
BR
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.