Skip to content

[19.0][OU-FIX] event: map badge_format from the legacy column - #6116

Open
JordiBForgeFlow wants to merge 1 commit into
OCA:19.0from
ForgeFlow:19.0-fix-event-badge_format
Open

JordiBForgeFlow wants to merge 1 commit into
OCA:19.0from
ForgeFlow:19.0-fix-event-badge_format

Conversation

@JordiBForgeFlow

Copy link
Copy Markdown
Member

The pre-migration copies badge_format to its legacy column but then maps the values on
badge_format itself, so openupgradelib logs an error for every migration and the
mapping reads the column it is writing. This reads the old values from the legacy copy
instead.

Steps to reproduce: migrate a 18.0 database with event installed. The log shows an
ERROR from map_values for event_event.badge_format. With the fix there is no error and
the badge formats are mapped.

The migrated values are the same with and without the fix, as map_values still runs
on the same column, so no migration test can tell them apart: checked on the migration
log of the OpenUpgrade test database, where the ERROR is gone and the mapping reads
openupgrade_legacy_19_0_badge_format.

Assisted by AI

The pre-migration copies badge_format to its legacy column but then
maps the values on badge_format itself, so openupgradelib logs an
error for every migration and the mapping reads the column it is
writing. Read the old values from the legacy copy instead.
@OCA-git-bot OCA-git-bot added mod:openupgrade_scripts Module openupgrade_scripts series:19.0 labels Nov 23, 2026
@legalsylvain

Copy link
Copy Markdown
Contributor

Assisted by AI

which one ?

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not adding value. The column is copied, so the previous code and this one are doing the same. Please check a bit the AI output.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:openupgrade_scripts Module openupgrade_scripts series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants