Skip to content

Fix NotNullViolation error when syncing work item color

What does this MR do and why?

When syncing epic and work item color during an epic update, we should not set work_item.color = nil when the color record has persisted because it raises an error

PG::NotNullViolation: ERROR:  null value in column "issue_id" of relation "work_item_colors" violates not-null constraint

Instead, we set the color value as the epic's color (in this case Epic::DEFAULT_COLOR).

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.

Edited by Eugenia Grieff

Merge request reports