How do I extract values for a Service Desk issue Participants?

Mark Pleake January 31, 2019

I'm trying to create an automation rule that auto assigns emails from Service Desk staff to that staff member, AND add one of the request participants (Assuming they added a customer on the TO or CC line) as the Reporter automatically.

This would enable Service Desk staff to reply via email to customers, CC the Jira listener, and have the ticket created, assigned correctly AND have the customer replace the service desk staff as Reporter.

My difficulty is in programmatically extracting the request Participants.  

https://docs.automationforjira.com/working-with-issue-data/available-values.html#available-smart-values

This document doesn't list participants as an available value.  Only watchers.

I've tried the {{issue.watchers}} and even using the sub list syntax to just grab one but it always sets the Reporter to Anonymous.

Also, how can I move this to the Service Desk community?  Doesn't seem to be a simple way. I can copy/paste I guess... 

3 answers

1 accepted

0 votes
Answer accepted
Nick Menere
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 4, 2019

Hi Mark,

 

Participants are just a custom field in Jira. You can access these via:

// In Jira Server
{{issue.Request Participants.first.key}}

//In jira Cloud
{{issue.Request Particpants.first.accountId}}

This will produce the key/id of the first user.

You can put that value into the reporter field.

 

Hope that is what you were after.

 

Cheers,
Nick Menere [Automation for Jira]
Co-founder

Mark Pleake February 4, 2019

Amazing timing, read this after just doing what i described below.

I tested the above and it didn't seem to work.

So, interestingly somehow it's a custom field but not named requestParticipants.

 

I found this: 

https://docs.atlassian.com/software/jira/docs/api/REST/5.0/?_ga=2.232526367.1699403830.1549170314-1218894426.1543335732#id199677

 

which let me dump all the fields, and I painstakingly parsed through them and found the customer names that were in participants were in a custom field named.... drumroll:

 customfield_13830

Based on your info that it's a custom field I hope that'll hold steady and I can use that to operate since the first.key part also seemed to work as soon as I switched the name.

 

Thanks!

Nick Menere
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 4, 2019

Ahh sorry.

That is the customfield id - the field should also have a readable name. e.g. "Request Participants".

 

You should be able to reference:

{{issue.Request Participants.key}}

We do some smarts to look up customfields by name and it usually makes the rule more maintainable.

 

Cheers,

Nick

Like Gert-Jan van der Pijl likes this
0 votes
Mahesh Kallepalli August 5, 2021

I have tried all these but not working. How to display request participants email id in automation for Jira email.

Gautham Hari April 26, 2022

Hi Mahesh, 

Try the following smart values in an automation rule's 'Log action' action with a manual trigger:

{{#issue.Request Participants}} * Name: {{displayName}}, Email: {{emailAddress}} {{/}}


It worked for me in JSM Cloud. Ensure you have at least one request participant added in the ticket from which you run the rule with manual trigger.

Like Mahesh Kallepalli likes this
0 votes
Dan Heroux June 26, 2019

Hi Mark,

Would you be able to provide a bit more detail on how you went about doing this?  We're actually implementing the exact same thing.

We've got the first part set up (agent emails it in, appears as Reporter and automation changes it from "Reporter" to "Assignee").

Now for the second part:  how are you transitioning that first Request Participant to Reporter using the {{issue.Request Participants.first.key}} you highlighted above in Automation for Jira?

Andrew Pinson October 25, 2019

Hey Dan,

 

I'm having the same issue as well.  We're you able to get it to work?  I'm passing the incoming data to myself in an email.  Everything is populating except for that recipient information.  (customefield_10024 for me)  I know its a lot, but you can see what I'm trying to see the info.  I've tried various combinations of {{issue.customfield_10024.<>.<>}} and {{issue.Request Participants.<>.<>}} but can't get anything to work.

Jens Hildenbeutel November 6, 2019

Hi,

an important thing to know: Although the accepted answer is correct and working, the mentioned custom field part "Request Participants" is localized! In my german version of Jira server, the working variable is actually

{{issue.Anfrageteilnehmer.first.key}}

Maybe that is of help to you, for me it could have saved me quite some time if someone had mentioned it...

Like Stephan Hannach likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events