mattermost-plugin-gitlab icon indicating copy to clipboard operation
mattermost-plugin-gitlab copied to clipboard

Sidebar header MR count should show assigned MRs instead of opened MRs

Open jdeamicis opened this issue 3 years ago • 9 comments
trafficstars

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.

jdeamicis avatar Dec 22 '21 10:12 jdeamicis

Hi @deandrade87, Are you interested in implementing this?

mickmister avatar Jan 12 '22 20:01 mickmister

@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?

sibasankarnayak avatar Apr 07 '22 15:04 sibasankarnayak

@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?

mickmister avatar Apr 07 '22 16:04 mickmister

@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 avatar Apr 07 '22 16:04 mickmister

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

image

mickmister avatar Apr 07 '22 20:04 mickmister

@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

sibasankarnayak avatar Apr 08 '22 12:04 sibasankarnayak

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 avatar Apr 08 '22 12:04 hanzei

@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.

jdeamicis avatar Apr 08 '22 13:04 jdeamicis

Triage agreed that @deandrade87 's suggestion is valid.

catalintomai avatar Apr 11 '22 19:04 catalintomai

Closing due to inactivity. The issue can be reopened with more interest from our community.

wiersgallak avatar Jun 14 '23 01:06 wiersgallak

@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 avatar Jul 28 '23 18:07 mickmister

@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):

  1. Merge Request Assigned: This will display all the PRs assigned to the user.
  2. Merge Requests Needing Review: This will display the PRs assigned to the user for review.
  3. 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".
  4. 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: gitlab-tabs

Demo video with the updated names on buttons: Demo-video

raghavaggarwal2308 avatar Aug 17 '23 15:08 raghavaggarwal2308

@raghavaggarwal2308 Awesome, this all LGTM :+1:

mickmister avatar Aug 17 '23 16:08 mickmister

@jdeamicis Do you agree with this direction?

mickmister avatar Aug 17 '23 16:08 mickmister