-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Users mentioned in Jira comment are not receiving DM notifications for Jira 9.2 #954
Comments
@mkdbns Heads up on this new issue reported by a customer |
@mickmister Are you using a cloud instance or a server instance? Also, can you please send us the MM version? |
Jira Server - 9.2.0 |
@erezo9 I'm curious if this is happening for you as well |
@mickmister ill have to check tommorow, but ye now that you mention it |
@mickmister I am getting the DM notifications when the user is mentioned in a Jira issue comment. I am using the exact setup from the above comment Jira Server - 9.2.0, Jira plugin - 3.2.5, Mattermost - 7.8.4.
mattermost-plugin-jira/server/utils.go Line 85 in 1766506
In this function, we are replacing the jira account IDs with the jira display name but not with the mattermost userID. Here we are replacing the accountID with the jira display name which we only get from the jira cloud. I can add the same logic for the jira server as well where we are only getting the jira username. Do you want to me parse the comment body and replace them with the mattermost userID for both the jira server and cloud? |
@Kshitij-Katiyar Maybe the first issue is occurring on the customer's system and not yours because they have some setting on that uses the user's email in the comment body? Thus making it so the parsing doesn't work currently if it doesn't match the account id. I'm thinking we should try to handle the (seemingly) 3 possible cases:
Does this line up with your understanding of the problem? Sorry I feel like I'm guessing here, but I'm mainly going off of the fact that the screenshot in the description is email, and that is what we have available to use I think, and I assume we aren't parsing/translating to MM user id properly. |
Sure @mickmister I only have 1 small doubt here, Right now if we are getting the account id in the comment body this function mattermost-plugin-jira/server/utils.go Line 85 in 1766506
replaces the account IDs with the jira display name whereas in the issue description you have clearly mentioned user's Mattermost username. So should i repalce everything with jira deplay name or Mattermost username? |
I'm not sure why that function isn't implemented in a way that uses the MM username. It looks like it is able to do so, though it's showing the Jira user display name instead. The most important part of this ticket is to fix the "mentions not coming through" issue. I'm wondering if the email is what was originally in the comment payload for the customer, or if that is the "display name" we are putting there from that function. Either way, it seems we are not able to translate the user identifiers in the comment body into MM users to process the DM notifications. @erezo9 I'm curious if you're able to weigh in on this. You mentioned that DM notifications may not be working on your server, and I'm wondering if the incoming comment payload has the email as the user identifier, as shown in the ticket description. |
@Kshitij-Katiyar I meant to mention you in the comment above |
@mickmister I tried updating the jira username with the email address and i stopped getting the dm notifications for the mention because regex we are using to parse the jira usernames from the comment body is not handling the email address. So i think this should be the reason why dm mention notification is not working for that and we can update the regex to handle the email to fix the issue of not getting the notification. Should i also update the code of function |
@Kshitij-Katiyar Sounds good to me. Thanks for debugging this issue
I'm trying to remember if there's a reason why we had it this way, or if there's a reason why an admin wouldn't want it to have that behavior. I think it's better to have the MM username, so that change sounds good to me. |
…rking' (#61) * [MI-3338]:Fixed issue mattermost#954 'DM comment notifications not working' * [MI-3338]:Fixed CI
* [MI-3338]:Fixed issue #954 'DM comment notifications not working' (#61) * [MI-3338]:Fixed issue #954 'DM comment notifications not working' * [MI-3338]:Fixed CI * [MI-3337]:Fixed review comment of PR #961 and added TC (#63) * [MI-3337]:Fixed review comment of PR #961 and added TC * [MI-3337]:Added EOF * [MI-3337]:Fixed review comments of #961 (#64) * [MI-3337]:Fixed review comment of PR #961 and added TC * [MI-3337]:Added EOF * [MI-3337]:Fixed review comments of #961
A customer has reported that users are not getting DM notifications when they are mentioned in a Jira issue comment. However, the users do get notifications for being assigned to an issue.
From the customer's screenshot, the DM notification posted for assignee does not format the mention in the comment correctly. It shows the user's email like:
I would expect the mention to be formatted using the user's Mattermost username mention instead. This makes me think that something is going on with Jira 9.2 where the mentioned user identifier is not what we expect it to be. It's possible this behavior has changed on Jira's side.
The text was updated successfully, but these errors were encountered: