[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
parent 22151d3566
commit 966e7db420

View File

@ -195,6 +195,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