Send custom email via ScriptRunner: Cannot add request participants as CC

Hello,

I am trying to create an automation which sends a custom email whenever an issue is closed on JIRA Service Desk. I am using the following option: Issue Workflow > Add Post Function > Script Post Function > Send a Custom Email.

I would like to fill the CC issue fields with the issue's request participants, as shown in the picture below:

customEmail1.PNG

The request participants is a locked custom field:

requestParticipantsField.PNG

The problem is:

The "CC issue fields" field does not seems to get the user email correctly. The CC is filled with some sort of user reference and the email cannot be sent this way. In the example below I used the reporter and request participant (customfield_13400) as the same user. 

previewEmail.PNG

Am I doing something wrong? I really need to use the request participants as CC for my email.

Regards,

Phellipe Silva.

 

JIRA v7.0.0
JIRA Service Desk v3.0.0
Adaptavist ScriptRunner for Jira v4.2.0.1

3 answers

1 accepted

Phellipe,

A bug report raised - GRV-865, the issue is that the request participants type is not handled correctly. A possible workaround would be to copy the values of the request participants to a multi user picker custom field (using a listener or a post function) and then use the multi user picker custom field in the cc field. If you need any assistance to implement the proposed workaround please let me know. I will keep you informed (or you can watch the above issue) for the progress.

Kind regards    

Thank you very much for the reply! I will try the proposed workaround. Regards, Phellipe.

Hi Phellipe,

UPDATE: The bug will be fixed in the next release, 4.2.0.5

Hi Phellipe, Can I ask you what type is your custom field ?

Hello Thanos, The type is "Request Participants". I think it is a specific type from Jira Service Desk. You can check it on the following link: http://postimg.org/image/xah6kcio1/

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,890 views 12 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot