Skip to content

Draft: Add automatic_title column and bulk title update method

euko requested to merge 343621-add-automatic-title-column-to-sprints into master

What does this MR do and why?

Part 2/3 of #343621 (closed)

None of the changes in this MR are user-facing. This MR contains the changes that have been split off from !75527 (closed) to reduce its MR size.

  1. Adds automatic_title column to sprints table.

    • This column will NOT be used immediately in this MR.
    • The column indicates whether the title attribute of a sprints record should be automatically updated based on the sequence attribute or not.
  2. Updates the spec for Iteration model (backed by sprints table) to ensure the introduction of automatic_title column does not affect the existing features.

  3. Creates a new class method update_iteration_titles for Cadence model.

    • Again this class method will NOT be used but merely added in this MR.
    • The method will be used to update the titles of the iterations belonging to a cadence using sequences column.

Migration output

UP

== 20211216081351 AddAutomaticTitleColumnToSprintsTable: migrating ============
-- add_column(:sprints, :automatic_title, :boolean, {:default=>false})
   -> 0.0022s
== 20211216081351 AddAutomaticTitleColumnToSprintsTable: migrated (0.0022s) ===

Down

== 20211216081351 AddAutomaticTitleColumnToSprintsTable: reverting ============
-- remove_column(:sprints, :automatic_title, :boolean, {:default=>false})
   -> 0.0016s
== 20211216081351 AddAutomaticTitleColumnToSprintsTable: reverted (0.0081s) ===

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by euko

Merge request reports