-
Notifications
You must be signed in to change notification settings - Fork 127
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
Add support for DM subscriptions based on "watching" an issue in Jira #507
Comments
Hi @mickmister, I'd like to work on this. Can you help me on getting started? |
@haardikdharma10 Sure, thanks for your interest in the ticket! First, you'll need to set up your development environment. Here's some docs to help get started. Join the Jira plugin channel on our community server and we can discuss the feature or any questions you might have! |
I'm thinking we will add some functionality added to line 60 below, that will call a new function defined on mattermost-plugin-jira/server/webhook_worker.go Lines 56 to 63 in 36bcf27
The function should do the following:
Here's some code to create a new notification to append to the array: mattermost-plugin-jira/server/webhook_parser.go Lines 302 to 308 in 36bcf27
|
Thanks for such a brief explanation @mickmister, really appreciated. After going through the docs and some minimal research, first question I have here is, we can have 2 things here, a type called 'Watcher' and a type called 'Watches' wherein the latter will look something like this:
This will represent a type of how many and which users are "observing" a Jira issue to track the status / updates. Watcher, which will look something like this:
This will represent a common user that "observes" the issue. Do we need both of them or only one? The function signature, according to me should be somewhat like: The REST API docs here were also helpful (unfortunately, there is no ready code snippet in go). With this, I am still confused on how to go about the second bullet you mentioned and the array part. I think I have understood the job in bits and pieces and just want to integrate things and get it done! |
@haardikdharma10 Thanks for the explanations of your strategy. I have some questions and suggestions:
In the description, I had mentioned func (s *IssueService) GetWatchers(issueID string) (*[]User, *Response, error) { I'm not sure why we need to add the
In one of the code snippets in my previous comment, there is a variable mattermost-plugin-jira/server/webhook.go Lines 30 to 38 in 36bcf27
At this point, it is filled with any users that were mentioned in a comment, or a separate notification in the array for the assignee of the ticket. We basically want to add any watchers to this array, but avoid adding any duplicates that are already in the array. Editing the Please let me know your thoughts @haardikdharma10 🙂 |
Hi @haardikdharma10, how are you doing? Do you have any thoughts or questions on my proposal above? |
Hi @haardikdharma10, hope everything is well. Is it okay if I unassign you from this ticket, so another developer may work work on the ticket? |
Hey @mickmister, sure. |
…mattermost#507) * add command setting watching * add new client api for GetWatchers * add function to add notification for the user who enable watching in setting
This reverts commit e17c0cf.
This reverts commit 8b6b28b.
Closing issues due to inactivity. This issue can be re-opened with more interest from our community. |
@wiersgallak Heads up that issues that are intended to be closed due to not being part of planned work, should be closed via the "Close as not planned" option in GitHub's UI. Otherwise it can be mistaken as "completed". Also, this issue in particular has an open PR from Brightscout #872, so maybe it shouldn't be closed. This feature is very high impact. It's currently just waiting on QA review, though currently not prioritized or testable due to #945 |
Thanks for catching it and letting me know the appropriate process. Noted for future updates. |
Summary
In order to get a DM notification from the Jira plugin, the user has to meet certain criteria like being assigned or mentioned. If a user is "watching" an issue in Jira's system, they could want to receive notifications for any changes on the issue. This can be a system-wide setting combined with a user-specific setting.
Additional Info
We can use
IssueService.GetWatchers(issueID string)
during the webhook event processing to compare against our users' settings.Note that this does not look possible in the GitHub plugin based on GitHub's documented API.
The text was updated successfully, but these errors were encountered: