Skip to content

Set default cadences automatic to false

Alexandru Croitor requested to merge default_cadences_to_non_automatic into master

What does this MR do?

We are creating a default iteration cadence behind the scenes, which is currently wrongly set to automatic. This MR fixes the automatic to false and also migrations any of the existing automatic=true records to automatic=false

We still want to keep the automatic=true as default column value, which will be useful when we reveal the cadences to the user, and the user would be able to turn it off.

Database

Affected records: ~700
explain select id from iterations_cadences where automatic=true
Seq Scan on public.iterations_cadences  (cost=0.00..135.43 rows=669 width=8) (actual time=0.010..0.777 rows=696 loops=1)
   Filter: iterations_cadences.automatic
   Rows Removed by Filter: 1274
   Buffers: shared hit=29
UP
== 20210317104032 SetIterationCadenceAutomaticToFalse: migrating ==============
== 20210317104032 SetIterationCadenceAutomaticToFalse: migrated (0.0719s) =====
DOWN
== 20210317104032 SetIterationCadenceAutomaticToFalse: reverting ==============
== 20210317104032 SetIterationCadenceAutomaticToFalse: reverted (0.0000s) =====

Update statement

Running update statement on database-lab

exec UPDATE "iterations_cadences" SET "automatic" = FALSE WHERE "iterations_cadences"."automatic" = TRUE
Session: 2779
The query has been executed. Duration: 0.000 s (edited)

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Alexandru Croitor

Merge request reports