Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Automation: Cannot access custom user picker field .emailAddress value

I am trying to send an email after issue transition to notify QA people to perform a test. Person responsible for it is marked it a custom "People" user-picker. I am limiting it to a single user. Project is "Team-managed", no extensions or plugins are in use.

While listing REST API json object for the issue, I see fields.customfield_100xx.emailAddress, but when I try to use it as either the recipient of the email or in simple Log test action it is empty. If I log the {{customfield_100xx}} object, it displays everything (name, avatar, id, …) but not the emailAddress. Displaying any other values (like .name) work fine. 

I have tried: {{issue.fields.customfield_100xx.emailAddress}}, {{fields.customfield_100xx.emailAddress}}, {{customfield_100xx.emailAddress}}, {{Field Name.emailAddress}} and few others (like {{Field Name}}{{emailAddress}} {{/}}, which does not pass validation while saving the rule). 

I smell a bug, but since I cannot find a report anywhere and no documentation handling this, I'd like to ask before I report it… Does anyone know what I am missing?

1 answer

0 votes
John Funk Community Leader Apr 11, 2021

Hi David,

Are you sure it is the same field? Custom fields in Team managed projects will not show in the Issues > Custom Fields list. You might be seeing a different field with the same name.

The other thing to try is all lowercase in your field name code - I have seen that work before.

Dear John,

thank you for lowercase suggestion, I tried, sady it did not help. Here is a piece of JSON API I took the info from:

Screen Shot 2021-04-12 at 9.19.11.png

It clearly is the field I am looking for. Could you maybe try on your instance? Just to confirm?

John Funk Community Leader Apr 12, 2021

The image came in a little big so I am not able to see all of the code. 

Here is the full JSON, I made a screenshot of only the important part. I need email address of person save I’d field “Quality Assistance”:

{"expand":"renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations","id":"12342","self":"https://racom-jira.atlassian.net/rest/api/2/issue/12342","key":"RA2H-36","names":{"statuscategorychangedate":"Status Category Changed","issuetype":"Issue Type","timespent":"Time Spent","project":"Project","fixVersions":"Fix versions","aggregatetimespent":"Σ Time Spent","resolution":"Resolution","resolutiondate":"Resolved","workratio":"Work Ratio","lastViewed":"Last Viewed","issuerestriction":"Restrict to","watches":"Watchers","customfield_10060":"Location","created":"Created","customfield_10020":"Sprint","customfield_10021":"Flagged","customfield_10022":"Target start","customfield_10023":"Target end","priority":"Priority","customfield_10024":"[CHART] Date of First Response","customfield_10025":"[CHART] Time in Status","labels":"Labels","customfield_10016":"Story point estimate","customfield_10017":"Issue color","customfield_10018":"Parent Link","customfield_10019":"Rank","timeestimate":"Remaining Estimate","aggregatetimeoriginalestimate":"Σ Original Estimate","versions":"Affects versions","issuelinks":"Linked Issues","assignee":"Assignee","updated":"Updated","status":"Status","components":"Components","customfield_10050":"Component","timeoriginalestimate":"Original estimate","description":"Description","customfield_10010":"Request Type","customfield_10056":"Hiring manager","customfield_10057":"Job role","customfield_10014":"Epic Link","customfield_10058":"Department","customfield_10015":"Start date","timetracking":"Time tracking","customfield_10059":"Date of hire","customfield_10005":"Change type","customfield_10006":"Change risk","security":"Security Level","customfield_10007":"Change reason","customfield_10008":"Change start date","aggregatetimeestimate":"Σ Remaining Estimate","customfield_10009":"Change completion date","attachment":"Attachment","summary":"Summary","creator":"Creator","subtasks":"Sub-tasks","reporter":"Reporter","aggregateprogress":"Σ Progress","customfield_10000":"Development","customfield_10001":"Team","customfield_10002":"Organizations","customfield_10003":"Approvers","customfield_10004":"Impact","customfield_10048":"Quality Assistance","environment":"Environment","duedate":"Due date","progress":"Progress","votes":"Votes","comment":"Comment","worklog":"Log Work"},"fields":{"statuscategorychangedate":"2021-04-12T09:07:51.020+0200","issuetype":{"self":"https://racom-jira.atlassian.net/rest/api/2/issuetype/10127","id":"10127","description":"A problem or error.","iconUrl":"https://racom-jira.atlassian.net/secure/viewavatar?size=medium&avatarId=10303&avatarType=issuetype","name":"Bug","subtask":false,"avatarId":10303,"entityId":"364d2a68-8653-492f-b944-b479fab8035d","hierarchyLevel":0},"timespent":null,"project":{"self":"https://racom-jira.atlassian.net/rest/api/2/project/10038","id":"10038","key":"RA2H","name":"HW RipEX2-H","projectTypeKey":"software","simplified":true,"avatarUrls":{"48x48":"https://racom-jira.atlassian.net/secure/projectavatar?pid=10038&avatarId=10419","24x24":"https://racom-jira.atlassian.net/secure/projectavatar?size=small&s=small&pid=10038&avatarId=10419","16x16":"https://racom-jira.atlassian.net/secure/projectavatar?size=xsmall&s=xsmall&pid=10038&avatarId=10419","32x32":"https://racom-jira.atlassian.net/secure/projectavatar?size=medium&s=medium&pid=10038&avatarId=10419"},"projectCategory":{"self":"https://racom-jira.atlassian.net/rest/api/2/projectCategory/10001","id":"10001","description":"","name":"Projekty"}},"fixVersions":[],"aggregatetimespent":null,"resolution":{"self":"https://racom-jira.atlassian.net/rest/api/2/resolution/10000","id":"10000","description":"Work has been completed on this issue.","name":"Done"},"resolutiondate":"2021-04-12T09:07:51.015+0200","workratio":-1,"lastViewed":"2021-04-12T10:34:32.458+0200","issuerestriction":{"issuerestrictions":{},"shouldDisplay":true},"watches":{"self":"https://racom-jira.atlassian.net/rest/api/2/issue/RA2H-36/watchers","watchCount":1,"isWatching":true},"customfield_10060":null,"created":"2021-04-11T10:15:33.623+0200","customfield_10020":null,"customfield_10021":null,"customfield_10022":null,"customfield_10023":null,"priority":{"self":"https://racom-jira.atlassian.net/rest/api/2/priority/3","iconUrl":"https://racom-jira.atlassian.net/images/icons/priorities/medium.svg","name":"Medium","id":"3"},"customfield_10024":null,"customfield_10025":"10118_*:*_4_*:*_549294_*|*_10117_*:*_1_*:*_17585_*|*_10119_*:*_1_*:*_0_*|*_10126_*:*_4_*:*_81770546","labels":[],"customfield_10016":null,"customfield_10017":null,"customfield_10018":{"hasEpicLinkFieldDependency":false,"showField":false,"nonEditableReason":{"reason":"PLUGIN_LICENSE_ERROR","message":"The Parent Link is only available to Jira Premium users."}},"customfield_10019":"0|i00lyp:","timeestimate":null,"aggregatetimeoriginalestimate":null,"versions":[],"issuelinks":[],"assignee":{"self":"https://racom-jira.atlassian.net/rest/api/2/user?accountId=557058%3Ab72e8101-b8ad-441a-8ecd-029d2c50f0b8","accountId":"557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8","emailAddress":"david.urban@hey.com","avatarUrls":{"48x48":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/48","24x24":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/24","16x16":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/16","32x32":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/32"},"displayName":"David Urban","active":true,"timeZone":"Europe/Prague","accountType":"atlassian"},"updated":"2021-04-12T09:07:51.248+0200","status":{"self":"https://racom-jira.atlassian.net/rest/api/2/status/10119","description":"","iconUrl":"https://racom-jira.atlassian.net/","name":"Done","id":"10119","statusCategory":{"self":"https://racom-jira.atlassian.net/rest/api/2/statuscategory/3","id":3,"key":"done","colorName":"green","name":"Done"}},"components":[],"customfield_10050":null,"timeoriginalestimate":null,"description":null,"customfield_10010":null,"customfield_10056":null,"customfield_10057":null,"customfield_10014":null,"customfield_10058":null,"customfield_10015":null,"timetracking":{},"customfield_10059":null,"customfield_10005":null,"customfield_10006":null,"security":null,"customfield_10007":null,"customfield_10008":null,"aggregatetimeestimate":null,"customfield_10009":null,"attachment":[],"summary":"TEST issue","creator":{"self":"https://racom-jira.atlassian.net/rest/api/2/user?accountId=557058%3Ab72e8101-b8ad-441a-8ecd-029d2c50f0b8","accountId":"557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8","emailAddress":"david.urban@hey.com","avatarUrls":{"48x48":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/48","24x24":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/24","16x16":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/16","32x32":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/32"},"displayName":"David Urban","active":true,"timeZone":"Europe/Prague","accountType":"atlassian"},"subtasks":[],"reporter":{"self":"https://racom-jira.atlassian.net/rest/api/2/user?accountId=557058%3Ab72e8101-b8ad-441a-8ecd-029d2c50f0b8","accountId":"557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8","emailAddress":"david.urban@hey.com","avatarUrls":{"48x48":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/48","24x24":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/24","16x16":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/16","32x32":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/32"},"displayName":"David Urban","active":true,"timeZone":"Europe/Prague","accountType":"atlassian"},"aggregateprogress":{"progress":0,"total":0},"customfield_10000":"{}","customfield_10001":null,"customfield_10002":null,"customfield_10003":null,"customfield_10004":null,"customfield_10048":[{"self":"https://racom-jira.atlassian.net/rest/api/2/user?accountId=557058%3Ab72e8101-b8ad-441a-8ecd-029d2c50f0b8","accountId":"557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8","emailAddress":"david.urban@hey.com","avatarUrls":{"48x48":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/48","24x24":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/24","16x16":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/16","32x32":"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:b72e8101-b8ad-441a-8ecd-029d2c50f0b8/eb99130b-afed-4b4f-bb10-9b176eb40852/32"},"displayName":"David Urban","active":true,"timeZone":"Europe/Prague","accountType":"atlassian"}],"environment":null,"duedate":null,"progress":{"progress":0,"total":0},"votes":{"self":"https://racom-jira.atlassian.net/rest/api/2/issue/RA2H-36/votes","votes":0,"hasVoted":false},"comment":{"comments":[],"self":"https://racom-jira.atlassian.net/rest/api/2/issue/12342/comment","maxResults":0,"total":0,"startAt":0},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]}}}

Hi @david-urban 

Please try this one: {{issue.customfield_10048.emailAddress.value}}

I have seen a few posts where the custom fields required the use of "value".

And if that does not help, would you please post an image of your complete rule and audit log from an execution? That may provide some context for the community to offer ideas.  Thanks!

Best regards,

Bill

Thank for suggestion Bill, sadly it still does not work. Here is the test Rule I use to display email in log:

Screen Shot 2021-04-13 at 20.19.08.png

And log result:

Screen Shot 2021-04-13 at 20.17.17.png

As you see, email does not get logged.

If I log the whole object {{customfield_10048}}, here is the result:

Screen Shot 2021-04-13 at 20.20.18.png

Even though email gets displayed in JSON API, it is not displayed in Rules… I have no idea why. 

I appreciate all you help! 

Hi @david-urban 

Smart values are case-sensitive, so please try that again with emailAddress.  Thanks!

__Bill

Like John Funk likes this

Thank you for the suggestion, it still does not work. :( 

Thanks, David.  Just to confirm, neither of these work, correct?

  • {{issue.customfield_10048.emailAddress}}
  • {{issue.customfield_10048.emailAddress.value}}

Is this a Team-Managed (formerly called Next-Gen) project?  If so there appears to be an open defect for the User Picker field access to the emailAddress attribute with automation:

https://codebarrel.atlassian.net/browse/AUT-1830

Like John Funk likes this

Yes, neither works and yes it is a Team-managed project. Sadly, it does not seem there is much traction in the issue. I have launched support request with Atlassian since this clearly in now confirmed as a bug. 

Thank you all for your help!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

126 views 0 7
Read article

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