Draft: Add automatic_title column and bulk title update method
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.
-
Adds
automatic_title
column tosprints
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.
-
Updates the spec for
Iteration
model (backed bysprints
table) to ensure the introduction ofautomatic_title
column does not affect the existing features. -
Creates a new class method
update_iteration_titles
forCadence
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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by euko