mattermost-plugin-gitlab
mattermost-plugin-gitlab copied to clipboard
Sidebar header MR count should show assigned MRs instead of opened MRs
As of now I see that the MR counter in the sidebar (the one showing Your open merge requests) shows the MRs someone has opened (i.e. the MRs for which the user is the author).
I believe it would make more sense to have the assigned MRs (i.e. the ones for which a user is assignee), rather than the opened ones.
Or maybe it could be made configurable.
Hi @deandrade87, Are you interested in implementing this?
@mickmister wanted to check on this, is someone working on this ?
if no wanted to check on the requirement. does this feature seeking to list only PR been assigned to user , instead of listing all the PR opened by user?
@hanzei Do you have thoughts on this? I would think that "My opened MRs" is what someone would mainly want to know about, but maybe conventions in GitLab are a bit different than GitHub.
It looks like the "assignments" category currently only uses issues and not MRs, so assigned MRs are neglected in the counts in general.
https://github.com/mattermost/mattermost-plugin-gitlab/blob/bbd7d386985c7745248da983f0d27a533ae3f2e0/server/gitlab/api.go#L281-L307
Maybe we should match the GitHub plugin's behavior and include issues and MRs for the assignments category? @deandrade87 How do you feel about this?
@sibasankarnayak Is there a reason you're wanting to pick up an issue that's not in the sprint planning board? I ask because there are a decent amount of open tickets in the "Todo" column.
The user connect welcome message states that the third category contains both merge requests and issues you are assigned to. @dipak-demansol Are you able to verify this is the case?
cc @hanzei
@sibasankarnayak Is there a reason you're wanting to pick up an issue that's not in the sprint planning board? I ask because there are a decent amount of open tickets in the "Todo" column.
@mickmister i picked it bymistake , but thought as worked on it so raised the PR
Maybe we should match the GitHub plugin's behavior and include issues and MRs for the assignments category?
That sound like the optimal solution to me
@hanzei Do you have thoughts on this? I would think that "My opened MRs" is what someone would mainly want to know about, but maybe conventions in GitLab are a bit different than GitHub.
It looks like the "assignments" category currently only uses issues and not MRs, so assigned MRs are neglected in the counts in general.
https://github.com/mattermost/mattermost-plugin-gitlab/blob/bbd7d386985c7745248da983f0d27a533ae3f2e0/server/gitlab/api.go#L281-L307
Maybe we should match the GitHub plugin's behavior and include issues and MRs for the assignments category? @deandrade87 How do you feel about this?
So, on GitLab the main buttons where a user sees their tasks are:
- issues assigned to the user (this is compatible with what the mattermost plugin does already)
- Merge Requests assigned to the user or waiting for a review by the user
- ToDos (which are usually generated whenever a user is mentioned or so). I believe the mattermost plugin is treating these correctly.
So, for the second category I would expect the same behaviour as GitLab's, namely MRs assigned + pending review, NOT the MRs opened by a user.
Maybe we should match the GitHub plugin's behavior and include issues and MRs for the assignments category?
That sound like the optimal solution to me
I would tend to disagree. Mattermost users most likely expect to see on the plugin the exact same numbers they see in their GitHub or GitLab systems. Therefore I would expect the two plugins for GitHab and GitLab to have different behaviours, depending on what the underlying systems do.
Triage agreed that @deandrade87 's suggestion is valid.
Closing due to inactivity. The issue can be reopened with more interest from our community.
@mkdbns I've added this to the plugin maintenance board. This isn't particularly urgent, but has been brought up by a few customers recently https://community.mattermost.com/core/pl/9pdx4qfbob8d7rs6jbs8ffaooo. The task is to implement the LHS counters as they are shown in GitLab's UI, as described here https://github.com/mattermost/mattermost-plugin-gitlab/issues/271#issuecomment-1092845823
@mickmister I have gone through the discussion and I think it would be best to have four buttons here (As there are three buttons on Gitlab and the "Merge requests" button has two subparts):
- Merge Request Assigned: This will display all the PRs assigned to the user.
- Merge Requests Needing Review: This will display the PRs assigned to the user for review.
- Issues: This will display all the issues assigned to a user (Same as the Gitlab system). This is already implemented but currently, the name of this button is "Your Assignments", we will update it to "Issues".
- To-Do List: Will display all the To-Dos (Same as the Gitlab system). This is already implemented but currently, the name of this button is "Unread Messages", we will update it to "To-Do list".
We are also thinking to update the icons on the "Issues" and "To-Do List" buttons to match the icons on Gitlab. Please let us know your opinions on this.
Buttons on Gitlab:
Demo video with the updated names on buttons: Demo-video
@raghavaggarwal2308 Awesome, this all LGTM :+1:
@jdeamicis Do you agree with this direction?