Skip to content

Added support for internal notes in draft notes

Phil Hughes requested to merge ph/451101/supportInternalNotesOnDraftNotes into master

What does this MR do and why?

This fixes a bug where the Make this an internal note would not be visible if any draft notes exists. It also adds support for internal notes on draft notes, with this users can create a draft note that when published is converted into an internal note

Migration up

main: == [advisory_lock_connection] object_id: 119680, pg_backend_pid: 27765
main: == 20240321105526 AddInternalToDraftNotes: migrating ==========================
main: -- add_column(:draft_notes, :internal, :boolean, {:default=>false, :null=>false})
main:    -> 0.0026s
main: == 20240321105526 AddInternalToDraftNotes: migrated (0.0063s) =================

main: == [advisory_lock_connection] object_id: 119680, pg_backend_pid: 27765

Migration down

main: == [advisory_lock_connection] object_id: 119720, pg_backend_pid: 27331
main: == 20240321105526 AddInternalToDraftNotes: reverting ==========================
main: -- remove_column(:draft_notes, :internal, :boolean, {:default=>false, :null=>false})
main:    -> 0.0026s
main: == 20240321105526 AddInternalToDraftNotes: reverted (0.0082s) =================

main: == [advisory_lock_connection] object_id: 119720, pg_backend_pid: 27331

#451101 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshot_2024-03-21_at_11.04.39

How to set up and validate locally

  • Create a draft note on a merge request
  • View the comment form on the overview tab
  • There should be a checkbox to make internal note
Edited by Phil Hughes

Merge request reports