How to get a string value from a drop down custom field (Groovy Scripted Field)

Thomas Scheibelhofer February 16, 2018

Hello,

is there a way to set a dedicated value to an object during the import?

My use case:

I am importing user-data with a specific GUID, this GUID could be used to build an URL which links to the persons intranet-profile.

What i'd like to do is give the importer a value to add in front of the imported GUID.

E.g. "https://intranet.mysite.com/" + Importvalue (the GUID)

Best regards

1 answer

1 accepted

1 vote
Answer accepted
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.
February 19, 2018

Hi Thomas, I would like to refer you to a similar question answered at https://community.atlassian.com/t5/Marketplace-Apps-questions/How-to-add-custom-field-while-importing-in-Insight/qaq-p/723536?utm_source=atlcomm&utm_medium=email&utm_campaign=immediate_general_answer&utm_content=topic

This example might need some extra lines added to get the value from the attribute containing the GUID, but you have access to the object and it's values using object  in groovy script, as mentioned at https://documentation.riada.se/insight/latest/insight-manager-s-guide/insight-automation

That represents the object bean https://insight-javadoc.riada.se/insight-javadoc-5.3.1/com/riadalabs/jira/plugins/insight/services/model/ObjectBean.html where you can get a list of all attributes and their values using getObjectAttributeBeans() and then getObjectAttributeValueBeans() for the attribute that you're interested in.

If you feel like you need help configuring scripts like this, we have partners available at riada.se/partners

Best Regards
Alexander

Thomas Scheibelhofer April 16, 2018

Thank you very much!

Best regards

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events