How to Set Reporter from the Request Participant?

Ian Riley April 6, 2018

I am accepting forwarded email requests from our clients via their software consultant. JIRA allows us to send an email with the CC set and that email ID gets added as a service desk customer and as a request participant on the ticket.

I have set up an automation rule that set the "Assignee" from the "Reporter" field successfully. Now I want to set the Reporter as the "Request Participant" that JIRA mail handler set from the CC email. After I will clear out the "Request Participants" on the issue and we are all set.

How can I set the reporter to the request participant?

I have tried: issue.customfield_10015.emailAddress, issue.customfield_10015.name, issue.customfield_10015.key, and issue.customfield_10015. 

But, that probably doesn't work since it's a list. Not sure how to get to the username to set it as the reporter. I'm assuming I need a user name, not email or name. Similar to the {{customer}} tag that is used after creating a new JSD customer.

Thanks, 

1 answer

1 accepted

1 vote
Answer accepted
andreas
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 8, 2018

Hi Ian,

So request participants is a multi-value field (there could be lots of participants), so you'll have to pick one (i.e. the first) to set as the reporter. Assuming that's ok, you should be able to use:

{{issue.Request participants.first.name}}

Something like this works for me:

set-reporter-participant.png

Our docs have more info on the multi-value field syntax: https://docs.codebarrel.io/automation/smart-fields/working-with-lists.html

Cheers,
Andreas

Ian Riley April 9, 2018

Almost what I'm looking for. I think the timing is affecting the availability of the issue.Request participants.first.name values. When I try to use this on my newly created issue from the email request, it is not available and sets the Reporter to Anonymous. When I test it and add a rule for a transition of the item later, the reporter is set correctly from the request participants.

Can I create an automation rule that happens after the entire create issue rule is completed? Is this where I could use a manual trigger or allow the first rule to call the second one?

andreas
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 9, 2018

Hi Ian,

I guess you could use the 'Field value changed' trigger and select the request participants field there.  So the rule would run only if the request participants field has a its value changed.

Cheers,
Andreas

Mansoor Khan April 15, 2019

@Ian Riley How did you do that actually?

Can you explain with little example how you were able to do that?

 

I am struggling with this same issue but simply can;t use this smart tagging in that fields

{{issue.Request participants.first.key}}

 

it gives me error in this code

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events