Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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... 

2 answers

1 accepted

0 votes
Answer accepted

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

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 Community Leader Feb 04, 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

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?

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.

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...

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Asked in Jira Service Desk

Calling all Insight users, we need your help!

Hello Insight users,  As part of our (Mindville's) acquisition by Atlassian, our training team is looking to build some new Insight training materials. It would really helpful if you can ...

96 views 1 0
View question

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you