Comments from logged in users seen as from Anonymous in email notifications

sever6159 December 7, 2021

Hi, community! Comments from logged in users seen as from Anonymous in email notifications, how to fix this? It's not for all users, there are no errors in atlassian-jira-outgoing-mail.log

Application:

 Image 2.png

E-mail notification:

Image 1.png

1 answer

0 votes
Radek Dostál
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 7, 2021

Odd, can't really find any known bug for it, nor have I come across this, but my 2 cents would be this is an application bug.

Jira generates an email, including the email body, and then hands it over to your mail server. It must be having some problems generating the mail body. So I would at least rule out this being any mail server problems, to me I'd say Jira has internally problems getting the right data for the mail body. Questions is.. where.

 

Can you try checking 2 parts if there's anything curious in it:

https://yourjira.com/rest/api/2/issue/<ISSUEKEY>?fields=comment


If you need to, feel free to sanitize url/names maybe, but please don't change the data "fundamentally". Just curious if everything in there seems stored right.

It should contain a json array for comments, something similar to this:

"fields": {
"comment": {
"comments": [
{
"self": "https://myjira.com/rest/api/2/issue/872647/comment/885686",
"id": "885686",
"author": {
"self": "https://myjira.com/rest/api/2/user?username=abcdguy",
"name": "abcdguy",
"key": "JIRAUSER11055",
"avatarUrls": {
"48x48": "https://myjira.com/secure/useravatar?avatarId=13806",
"24x24": "https://myjira.com/secure/useravatar?size=small&avatarId=13806",
"16x16": "https://myjira.com/secure/useravatar?size=xsmall&avatarId=13806",
"32x32": "https://myjira.com/secure/useravatar?size=medium&avatarId=13806"
},
"displayName": "Sample full name",
"active": true,
"timeZone": "UTC"
},
"body": "test",
"updateAuthor": {
"self": "https://myjira.com/rest/api/2/user?username=abcdguy",
"name": "abcdguy",
"key": "JIRAUSER11055",
"avatarUrls": {
"48x48": "https://myjira.com/secure/useravatar?avatarId=13806",
"24x24": "https://myjira.com/secure/useravatar?size=small&avatarId=13806",
"16x16": "https://myjira.com/secure/useravatar?size=xsmall&avatarId=13806",
"32x32": "https://myjira.com/secure/useravatar?size=medium&avatarId=13806"
},
"displayName": "Sample full name",
"active": true,
"timeZone": "UTC"
},
"created": "2020-04-07T05:18:43.545+0000",
"updated": "2020-04-07T05:18:43.545+0000"
}
]
}
}

(pardon the crap formatting)

 

Lastly, when you visit the user's details

/rest/api/2/user?username=abcdguy

 

We should be able to see if it contains all the right data -- especially the display name.

 

----

 

Having said all that, I don't know in detail how the process of Jira generating the email body works - but it has to be working with some data, so I'd at least start by first verifying if the data is stored correctly to begin with.

Perhaps you could do the same for another issue where the notification is right - maybe there's any difference between the right and wrong issue? Or between the users themselves?

Also, this seems like a batch notification - can you try reproducing this with A) batched notification like so, and B) a single mail notification (NOT batched with any other event)

sever6159 December 8, 2021

Radek, thnx for answer. Following your instruction have maken test issue in sandbox project in our jira instance and have asked 3 users to write comments:

user1guy - seen as Anonymous in email notifications

user2guy - seen as "Display name" value in email notifications

user3guy - seen as Anonymous in email notifications

The only difference in JSON outputs is that user1guy and user3guy have "key" value something like  "JIRAUSER17825", user2guy has "key" value as his "username" or "name" -  "user2guy". All e-mail notifications have sender address like 'Display Name value (Jira) <JIRA@example.com>'

Any ideas?

Radek Dostál
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 8, 2021

Unfortunately no. This doesn't make sense to me. If all looks right, and it's "just" the mail notification, I have no other ideas, this kinda sounds like a good time for atlassian support.

I mean you might try restarting the Jira instance to flush caches (but if you are on multi nodded data center then you would need to shutdown all nodes at the same time), or you might try flushing them while Jira is running (ScriptRunner has a built-in script for it), but last we tried it it basically locked the whole instance for about 15 minutes, made it totally unusable.

I also doubt that caches are the culprit, but.. well it wouldn't be the first time I was wrong.

I also do not see how the "more modern JIRAUSERxxxxx" userkey format would be of any significance. It's just a piece of string, doesn't matter for userkey those guys have. However.. if 'user2guy' has the old way of userkey, that means he has an old account.

If 'user1guy' and 'user3guy' have a JIRAUSER type of key, that means they were created "more recently" - i.e. different Jira version at least. So it's a pretty long shot but could be of interest to Atlassian, maybe there was a related bug at some point where something for these 2 was not done the same was as for the old ones? Maybe some kind of user property or something, who knows.

Would raise a support ticket for this, if nobody else has an idea.

Suggest an answer

Log in or Sign up to answer