Jira webhook doesn't return assignee email

Dan July 17, 2019

a few days ago our php emailer stopped working. It works by generating emails whenever a webhook is called. The webhook is called whenever we drag an issue from one place to another.

after digging i found that the JSON sent to the php script no longer contains the assignees email address (issue->fields->assignee->emailAddress). 

I did however find that if i drag an issue that is assigned to me it does contain my email in the assignee data.

1 answer

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 18, 2019

Hello @Dan ,

 

The behavior you are reporting seems related to the introduction of the new Profile and Visibility settings:

 

In short: this change was needed in order to comply with GDPR. As a result, even if you don't see the email address, you should still be able to get the Public Name and the Account ID for the users. 

This change has been widely announced and documented:

 

Guidelines for developers are available in the below threads:

 

Also, be aware of the below bugs when handling non-managed users:

 

Please review the above links and let me know if you have further questions on this topic.

 

Cheers,
Dario

Dan July 18, 2019

I made my email public as i suspected this was the case but still nothing gets returned in the email field if someone else updates an issue related to me. 

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 19, 2019

Hi @Dan ,

I have just tested this and for unmanaged accounts I am actually always able to get the email address. 

I have set my WebHook to be triggered on issue created or updated events and I am using https://beeceptor.com to test it.

Now, since this is working fine for me, can you kindly provide more details on what you have done? E.g.:

  •  Are you testing this using managed or un-managed accounts?
  • Which events are triggering the WebHook?
  • Do you use any JQL query to filter events, or all the issues are returned? 

 

Please let me know.

 

Cheers,
Dario

dlozanolu July 21, 2019

Hello Dario,

I have the same problem. Is there any way to make it work again like before?

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2019

Hi @dlozanolu ,

This changes are due to GDPR and cannot be reverted.

Also, in @Dan case the email address  is not returned even if it is set to public, and this needs further investigation:

  •  Are you testing this using managed or un-managed accounts?
  • Which events are triggering the WebHook?
  • Do you use any JQL query to filter events, or all the issues are returned? 

 

Therefore:

if you have the email address set to public in the Visibility Control Settings and you are still unable to get the email address, please answer above questions.

If the email address is not public, this is just working as expected and you may want to review the below 2 threads in the Developers Community for further details about this change:

 

Finally, for questions about GDPR, please either ask in the Developer Community or raise  a request with our Developer Support team.

 

I hope this helps.

 

Dario

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2019

EDITED: 

I have just got confirmation that the email address should be displayed or not according to what is configured in the user profile visibility settings. Therefore let's just  continue the way we were :) 

[...] the email should be displayed if the visibility is set to “show”, but not if it’s “user” in the case of webhooks [..]

 

 

Cheers,
Dario

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2019

@Dan , 

If I understand  correctly, the user email is not returned  in case:

  1. You set your email address visibility as public
  2. You create an issue and you set yourself as the assignee of the issue
  3. Another user, not you, edit the issue and the payload of the webhook being triggered by this action is not returning the email address for the reporter/creator?

Is this correct?

Can you also answer the  questions I asked in my previous comment?

  •  Are you testing this using managed or un-managed accounts?
  • Which events are triggering the WebHook?
  • Do you use any JQL query to filter events, or all the issues are returned?

 

Dario

Dan July 29, 2019

sorry for the delay in replying

My email address does show up in the rest API now it just took some time. 

not sure if we're using managed or unmanaged (how do you tell?)

the webhook is triggered when a user drags an issue from one part of the board to another.

we use ( JQL: project = "Claro Software" )as our JQL query.

do I have to tell my colleagues to all set there emails to public so that i can get their emails? 

 

we used the webhook so that when an issue was dragged to a certain column it would send an email. 

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 14, 2019

Hi @Dan ,

Apologies for late reply, I am just back from vacation. 

As mentioned in the Managed Accounts documentation page:

Once you've created an organization and verified a domain, all the Atlassian accounts with email addresses from that domain become managed accounts.

 

However, regardless what kind of user account you have in your instance, if you want  to have a notification sent every time an issue is transitioned there might be a better way to do so: since the board columns are corresponding to workflow statuses, you can actually configure your project workflow in a way that it will send a custom event every time there is a transition between the desired statuses and then configure a notification to be sent on that custom event. 

For details on how to  do so please see:

  1. Adding a custom event (Workflow configuration part)
  2. Custom events (configuring notifications for a custom event)

 

Please let me know if this helps or provide more details on what you are trying to achieve in case it doesn't.

 

Finally, please find below the expected behavior for the different Profile Visibility Settings

  • anything set to public will always be visible regardless of the type or caller or the authentication method

  • anything set to the user's organisation will be visible to:

    • users in the ui

    • users doing rest calls authenticating as themselves

    • it won't be visible to connect apps*

    • it won't be visible in webhooks

  • anything set to "only me and admins" will be visible to:

    • the user when they request themselves (apart from in connect apps)

    • in the user management ui (admin.atlassian.com) it will be visible to admins in the user list (but no where else)

    • if its a managed account it might also be accessible to admins through the identity user managment api (not the same as Jira rest api) https://developer.atlassian.com/cloud/admin/user-management/rest/#auth 

  • customer accounts email will be visibile:

    • to agents in the UI on profile cards

    • to agents in places using user search apis inside Jira (there is no clearcut rule for which places it is), including the user search rest api, but not the user lookup api

    • it should be visible to all agents everywhere (apart from connect apps*)


      * connect apps can apply through ecosystem to use some special api endpoints to get email regardless of privacy settings. This has to be approved by legal and is only for apps in specific use cases

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer