Remove email participants quick action
What does this MR do and why?
Solves issue #225310 (closed)
issue_email_participants
.
Based on Community contribution Draft: Remove multiple email partcipants (!103074 - closed) by @ArkaprabhaChakraborty
Adds the quick action /remove_email
which is the counterpart for /invite_email
. They are used to manage external participants on an issue. Each public comment will generate Service Desk emails to all external participants on an issue.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Quick action in editor
System note after execution (with one email)
System note after execution (with multiple emails)
How to set up and validate locally
- Select a project and enable the feature flag for
issue_email_participants
.project = Project.find(7) Feature.enable(:issue_email_participants, project)
- Go to the projects issue list and select an issue or create a new one
http://127.0.0.1:3000/flightjs/Flight/-/issues
- Go to the issue detail page and write a comment that adds an external participant like so:
/invite_email user@example.com
- See that a system note has been added.
- Now remove that participant:
/remove_email user@example.com
- See that a system note has been added.
- Now experiment with adding and removing external participants.
- (Optional) Disable the feature flag in the console:
Feature.disable(:issue_email_participants, project)
Database
The /remove_email
quickaction removes up to 6
emails from the issue.
Find emails of issue
SELECT "issue_email_participants".* FROM "issue_email_participants"
WHERE "issue_email_participants"."issue_id" = 658 AND
(LOWER("issue_email_participants"."email") IN (LOWER('user@example.com')))
Index Scan using index_issue_email_participants_on_issue_id_and_lower_email on issue_email_participants (cost=0.43..3.45 rows=1 width=59)
Index Cond: ((issue_id = 658) AND (lower(email) = 'user@example.com'::text))
Delete all
DELETE FROM "issue_email_participants"
WHERE "issue_email_participants"."issue_id" = 658 AND
(LOWER("issue_email_participants"."email") IN (LOWER('user@example.com')))
Delete on issue_email_participants (cost=0.43..3.45 rows=0 width=0)
-> Index Scan using index_issue_email_participants_on_issue_id_and_lower_email on issue_email_participants (cost=0.43..3.45 rows=1 width=6)
Index Cond: ((issue_id = 658) AND (lower(email) = 'user@example.com'::text))
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.