How to get the Reporter email copied to a custom field? [using Jira Cloud Automation]

Juan Recabarren [ServiceRocket]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 16, 2020

Hi Community,

I've been trying to copy the reporter email to a custom single line text field, I tried using the Automation app and I created this very simple rule using these options:

  • When: Issue created
  • Then: Edit issue fields
  • I'm using this rule:
{
"fields": {
"customfield_16802": {{reporter.emailAddress}}
}
}

But it just copies my user name into my custom field, so I'm wondering if I'm missing something?

automation.png

5 answers

1 accepted

2 votes
Answer accepted
Bill Sheboy
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.
July 1, 2020

Hi @Juan Recabarren [ServiceRocket] 

Did you figure this out?  This worked for me to get the email address:  {{issue.reporter.emailAddress}}

 

Best regards,

Bill

Juan Recabarren [ServiceRocket]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 1, 2020

Hi @Bill Sheboy  thanks for your input that suggestion worked for me.

Like # people like this
SUNMI HELP DESK March 10, 2021

Hi @Bill Sheboy I set up automation according to your comment, and still prompted an error。Very much hope for your help。

微信图片_20210310210253.png微信图片_20210310210301.png

Bill Sheboy
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.
March 10, 2021

Hi @SUNMI HELP DESK 

Please try putting quotation marks around the smart value tag, such as with:

{
"fields": {
"customfield_10146": "{{issue.reporter.emailAddress}}"
}
}

There may be something in the email address that the parser doesn't like, and so the quotation marks should help.

Best regards,

Bill

Like Ed Felt likes this
SUNMI HELP DESK March 11, 2021

Hi @Bill Sheboy Thank you very much for your help. I want to use fuzzy query to find the target mailbox (such as searching for a part of the mailbox suffix) in advanced search. Is there any way?

Bill Sheboy
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.
March 11, 2021

I do not understand what you are trying to achieve when you note "target mailbox".

Have you investigated using the string functions like match() with RegEx expressions for the searching?

SUNMI HELP DESK March 11, 2021

@Bill Sheboy Sorry, I didn't make it clear. We want to fuzzy search the suffix of the user's registered mailbox, and we can count and view the ticket submitted by the user's mailbox. We have not studied the jira command set, please guide me how to implement it.

Bill Sheboy
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.
March 11, 2021

Hi @SUNMI HELP DESK 

Please review this documentation to see examples of using the string parsing functions for automation rules.  After you see what is available, you can try to use those to search the email address suffix.

https://support.atlassian.com/jira-software-cloud/docs/smart-values-text-fields/

Once you start trying those functions, please post back here for any specific questions you have.  Thanks!

0 votes
DL December 26, 2023

Hi @Bill Sheboy ,

If i want to copy a custom field to the reporter, how do I do that? I have a custom field (text) with the email address. I tried below, but it didn't work.

 

{
"fields": {
{{issue.reporter.emailAddress}}:"issue.customfield_10094"
}
}

Bill Sheboy
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.
December 26, 2023

Hi @DL 

First thing, rather than add on to this older post, I recommend creating a new question and linking back to this thread.  Otherwise only the people following this one will see it to contribute ideas.

When you post the question, ensure you include your Jira version (i.e., Cloud, Server, or Data Center), your complete automation rule, the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer suggestions.

Back to what you asked...In an automation rule, a user field (e.g., Reporter) may only be set with another user object or with the account id value.  It cannot be set using the email address.

Kind regards,
Bill

Like DL likes this
0 votes
SUNMI HELP DESK March 10, 2021

Hello @Juan Recabarren [ServiceRocket] can you provide the creation steps?

0 votes
shetty
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.
December 23, 2020

Hi @Bill Sheboy 

even I tried this but unable to get it in text field

I'm getting error as "Operation value must be a string"

is any other type of field is recommended?

Bill Sheboy
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.
December 28, 2020

Hi @shetty 

Please post the syntax of what you have tried to provide context.  Thanks!

Best regards,
Bill

shetty
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.
January 4, 2021

@William Sheboy 

got it with JMWE Plugin

Thanks

0 votes
Cameron Taylor August 10, 2020

Thanks Bill! I was looking for this real quick on how to use the reporter's email address in a new automation I'm creating and this popped up.

Bill Sheboy
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.
August 10, 2020

Hi @Cameron Taylor   I am glad that helped you!

__Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events