Add attribution to external participant
What does this MR do and why?
Adds a column in the notes
table to store the email addresses of the external participants. As of now, this column is used by the service desk for the external email addresses.
Changes frontend and backend to match the design set mentioned in #226995 (closed)
Adds specs for backend and frontend
This feature is behind a feature flag. See [Feature flag] Rollout of `external_note_author... (#408932 - closed).
Screenshots or screen recordings
This is how it looks on the UI.
Before
After
For user with atleast reporter permissions
For user with guest and below permissions if the issue is public
Migrations
UP
main: == 20230413045416 AddEmailParticipantColumnToNote: migrating ==================
main: -- add_column(:notes, :issue_email_participant, :text, {:null=>true, :default=>""})
main: -> 0.0044s
main: == 20230413045416 AddEmailParticipantColumnToNote: migrated (0.0084s) =========
main: == 20230419062355 AddTextLimitToEmailParticipantInNotes: migrating ============
main: -- transaction_open?()
main: -> 0.0000s
main: -- transaction_open?()
main: -> 0.0000s
main: -- execute("ALTER TABLE notes\nADD CONSTRAINT check_469b8a1e9b\nCHECK ( char_length(email_participant) <= 255 )\nNOT VALID;\n")
main: -> 0.0040s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0002s
main: -- execute("ALTER TABLE notes VALIDATE CONSTRAINT check_469b8a1e9b;")
main: -> 0.0012s
main: -- execute("RESET statement_timeout")
main: -> 0.0002s
main: == 20230419062355 AddTextLimitToEmailParticipantInNotes: migrated (0.1123s) ===
DOWN
main: == 20230419062355 AddTextLimitToEmailParticipantInNotes: reverting ============
main: -- transaction_open?()
main: -> 0.0000s
main: -- transaction_open?()
main: -> 0.0000s
main: -- execute(" ALTER TABLE notes\n DROP CONSTRAINT IF EXISTS check_469b8a1e9b\n")
main: -> 0.0035s
main: == 20230419062355 AddTextLimitToEmailParticipantInNotes: reverted (0.1843s) ===
main: == 20230413045416 AddEmailParticipantColumnToNote: reverting ==================
main: -- remove_column(:notes, :issue_email_participant, :text, {:null=>true, :default=>""})
main: -> 0.0020s
main: == 20230413045416 AddEmailParticipantColumnToNote: reverted (0.0088s) =========
How to set up and validate locally
- Setup Service desk by following the steps mentioned in setup doc.
- Create an issue using the service desk email.
- Copy the
reply-to
email address from the letter opener. - Send an email to the above address and see your email as comment author and match the design mentioned in the linked issue and screenshot.
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.
Related to #226995 (closed)
Edited by Peter Leitzen