JETI/Notifications & Insight: Use an insight object attribute as an email recipient

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2019

This is a bit of a combined question for 2 apps. (Email This Issue (JETI) and Insight).

I have a Request Type that uses several insight custom fields (such as a Department or Application list) which within Insight has an attribute "Manager or Application Owner" which is a JIRA User.

 

Now when submitting this request I would like to send an email to the manager/application owner of this insight custom field value without having to store it on the request itself.

Something like recipient = application.applicationowner

 

My question(s) here would be:

- Is this possible using JETI or just regular customer notifications?

- Is there any way in either JETI or notifications to get this information from the Insight object and use it a recipient OR do i need to store the recipient in some kind of hidden field on the request itself? 

This would be my workarround to get the insight object, get the attribute and store it on the issue itself so it can be selected as a recipient (custom field).

 

Any suggestions/help is welcome.. other plugins that might achieve this also but I would at first like to get this done using just JETI/Customer Notifications/Insight/(Scriptrunner)

 

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Sandra _Mindville_
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.
June 5, 2019

Hi Dirk.

Have you thought about just using Insight Automation to do this? You can by having automation rules in Insight to trigger notifications. See our documentation here: https://documentation.riada.io/display/INSSERV/Insight+Automation#InsightAutomation-Emailnotification

Kind regards,
Sandra

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2019

Hi Sandra,

I just read diagonally through the documentation and while interesting I don't believe this would fit my use case.

The Insight automation seems to mainly focus on when a change occurs on an Insight object.

In my case I would simply use the data from Insight in an issue and when an issue is created trigger an email notification using that insight data (being the value in an object attribute as the recipient)

Sandra _Mindville_
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.
June 5, 2019

You are correct. 

How about using the Jira workflow to trigger this. Then you would you the Insight post-function "Email user(s) based on attribute in a selected Insight Object".
But this might mean an extra step in your workflow.

Like Dirk Ronsmans likes this
Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2019

That might be a good one.

I could just add the post function on the create transition and set the condition to the specifc request type.

 

I'll evaluate this one (but look a valid solution) and otherwise I'll try my workarround by storing the attribute in a customfield and using that customfield in the recipient field of the email.

Like Sandra _Mindville_ likes this
Deleted user June 23, 2019

Hi Dirk, 

did the post function fit for you?

We're facing nearly the same situation. We would prefer using JETI for e-mails send, because of e-mail history on issues and better mail-templates. 

Attributes from insight can be rendered within the e-mail body, but not within the reciepient field.

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 7, 2019

Since the post function can't use the JETI templates we didn't use this method.

Eventually I just stored the recipients data in a "helper" field on the issue type and then used that on the template.

 

The post function is better if you want to trigger on a change of the Asset itself.

kahn chang October 10, 2019

Hi Dirk, 

We copy the user email attribute of insight object to a hidden field by insight post, and then send the message with JETI, because insight's mail function is too simple. However, when using JETI to send e-mail, we can only display the name of the insight object in the e-mail, not the attribute of insight object, which makes us very distressed.Do you have similar needs and any ideas?

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 11, 2019

@kahn chang 

for us the email attribute on the insight object was sufficient. We just needed to send an email with the data from the issue to the "email attribute". 

We indeed copied this over to the issue in a hidden "insight recipient field" and used it in JETI.

I think the only way to get fully custom and use all kinds of attributes of Insight objects in an email (with JETI) is to use the JETI api.

In a different use case we scripted the email content (or used a template) and sent it with the JETI api.

It's a bit more work but you can send to whoever you want and add a payload of velocity references that a JETI template will resolve.

 

https://metainf.atlassian.net/wiki/spaces/PLUG/pages/66093062/API+-+Integration+with+other+services

Suggest an answer

Log in or Sign up to answer