[IMP] runbot: add a message when a build error is merged

When digging into deactivated build errors, one cannot easily find why
an error was deactivated and to which one it was merged.

With this commit, a message is added in the chatter to explain where it
is merged.
This commit is contained in:
Christophe Monniez 2024-11-18 12:04:31 +01:00 committed by xdo
parent 57bd762d9c
commit a82a995397

View File

@ -199,6 +199,7 @@ class BuildError(models.Model):
error.team_id = previous_error.team_id
previous_error.error_content_ids.write({'error_id': self})
if not previous_error.test_tags:
previous_error.message_post(body=Markup('Error merged into %s') % error._get_form_link())
previous_error.active = False
@api.model