Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Question about Insight Postfunction

VOO Jira Team March 29, 2018

I'm using "Set a Jira custom field with the attribute value from a selected object" and the field "Insight Object Type Attribute name" in postfunction does support "Attribute A" but doesn't support "Attribute A"."Attribute A1" if "Attribute A" is an Object Type Attribute ... Then Could you give me the Groovy script beside this Post function for me trying to make it work using the post function "Run a groovy script within this transition"

Regards,

Pierre-Jean.

1 answer

1 accepted

0 votes
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.
April 6, 2018

Hi Pierre-Jean,

Your correct, in this post function you can't access the attribute from another Object so to say.

I don't have an ready script for this use case, but I can point you to our examples we have, and I think you can use them as an inspiration.

I think this example could be interesting for your use case: https://documentation.riada.se/insight/latest/insight-advanced-usage-guide/insight-for-developers/groovy-scripting/groovy-script-examples/post-functions/update-insight-custom-field

And all examples are available at https://documentation.riada.se/insight/latest/insight-advanced-usage-guide/insight-for-developers/groovy-scripting/groovy-script-examples/post-functions

If you feel like this answered your question, please mark it as accepted :)

Cheers!
Alexander

VOO Jira Team April 6, 2018

Do you think it's possible to add this functionality in a near future ?

In the meantime, yes i already know those examples and i should be wrong but the source code of the postfunction "Set a Jira custom field with the attribute value from a selected object" is the code (Groovy or Java) i'm looking for ... Moreover, there is no example where you update/set a (non-Insight) customfield with Insight customfield attribute => it would be nice to have one :)

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.
April 6, 2018

It's not planned to add this functionality in the near future, but feel free to create a feature request for this at jira.riada.se

Yes I think that example will match your use case :) 

As there are endless opportunities for what can be done using groovy scripts with the available Insight and JIRA API, it's impossible to cover all cases ;) 

There is one example however where we set the organization field, which is not an Insight custom field: https://documentation.riada.se/insight/latest/insight-advanced-usage-guide/insight-for-developers/groovy-scripting/groovy-script-examples/post-functions/set-an-insight-custom-field-value-to-the-organization-of-the-reporter

But I would recommend you to look into JIRAs own API for Issues in this case on how to set there fields.

Also, we do have some awesome partners who can help with creating scripts and configuration of both Insight and JIRA, if that would be interesting check in https://riada.se/partners/

Cheers!
Alexander

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events