Skip to content
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

Enable bulk actions by Jira filter #140

Draft
wants to merge 34 commits into
base: master
Choose a base branch
from
Draft

Conversation

chandler05
Copy link
Member

@chandler05 chandler05 commented Dec 5, 2020

Purpose

Large amounts of requests like adding versions can end up being very tedious to do Individually. With a new reaction and command, the bot will provide a Jira filter will all of the tickets from specific requests in order to use a Bulk Action.

Approach

Workflow:

  1. Add the bulk reaction to any requests
  2. Type '!jira bulk'
  3. The bot will send a Jira link with a filter containing all tickets from the requests you reacted to
  4. The bot will remove your reactions
  • If the command is typed as '!jira bulk <emoji>', then all requests that were reacted to will be resolved with that emoji.

This works per person, so the filter will only contain tickets from requests you personally reacted to

Future work

@chandler05 chandler05 changed the title Enable bulk action by Jira filter Enable bulk actions by Jira filter Dec 5, 2020
Copy link
Member

@SPGoding SPGoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I understand, the bulk emoji will result in showing the prompt as there's no special check in RequestResolveEventHandler.

Also, how about adding tickets IDs to an array as soon as someone reacted an request with the bulkEmoji, so we're not iterating the whole internal channel when executing !jira bulk command?

@chandler05
Copy link
Member Author

Wouldn't that stop the filters from being individual for each person?

@SPGoding
Copy link
Member

SPGoding commented Dec 5, 2020

Wouldn't that stop the filters from being individual for each person?

It's still possible to make a Map from user tags to arrays 👀

Awwwso, instead of asking the volunteer to execute !jira bulk manually to see the filter, how about adding it to a new field of internal embed in some format like [bulk filter](https://bugs.mojang.com/jql@#%$^^%) as soon as the volunteer reacted it with the bulkEmoji? This way, the Set (or Map) maintained in RequestEventHandler doesn't have to be exposed to another handler, and it would require less effort from the volunteer's side.

@chandler05
Copy link
Member Author

Where would that be posted?

@SPGoding

This comment has been minimized.

@chandler05
Copy link
Member Author

The filter is supposed to extend over any request with the reaction. That confuses me as to how that would work. Plus, wouldn't that only work for one user?

@SPGoding
Copy link
Member

SPGoding commented Dec 5, 2020

Yeah I just gave it another thought and it's quite difficult to maintain if we put the JQL link directly in the embed. So I guess we still have to go with the !jira bulk command 🤔

I strikethroughed and hid my irrelevant reviews.

@chandler05
Copy link
Member Author

I changed the code to make it so a map of users to bulk messages is stored instead of iterating through all of the messages in the channel each time. I also fixed the bulk emoji from triggering the prompt/resolution.

@chandler05
Copy link
Member Author

Adding an emoji after '!jira bulk' should now resolve all of the requests in the bulk filter with that emoji

src/commands/BulkCommand.ts Outdated Show resolved Hide resolved
src/events/request/RequestBulkRemoveEventHandler.ts Outdated Show resolved Hide resolved
src/events/reaction/ReactionAddEventHandler.ts Outdated Show resolved Hide resolved
src/commands/BulkCommand.ts Outdated Show resolved Hide resolved
src/events/request/RequestBulkRemoveEventHandler.ts Outdated Show resolved Hide resolved
src/commands/BulkCommand.ts Outdated Show resolved Hide resolved
src/commands/BulkCommand.ts Outdated Show resolved Hide resolved
src/commands/BulkCommand.ts Outdated Show resolved Hide resolved
src/commands/BulkCommand.ts Outdated Show resolved Hide resolved
src/commands/BulkCommand.ts Outdated Show resolved Hide resolved
@chandler05 chandler05 marked this pull request as draft December 7, 2020 23:22
@chandler05 chandler05 marked this pull request as ready for review December 7, 2020 23:50
@chandler05
Copy link
Member Author

The feature is working very well, but for some reason it seems to ocassionally miss some of the bulk emoji reactions in the internal channels

@chandler05 chandler05 marked this pull request as draft January 9, 2021 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants