From 0b5d7d0566ee65a32e35bea8260de0e36ef0edf4 Mon Sep 17 00:00:00 2001 From: odoo Date: Tue, 17 Sep 2024 09:57:01 +0200 Subject: [PATCH] [IMP] add customer on runbot build tasks Idea is to help runbot/QA team to monitor other peoples tasks easier. This way we will have a responsible person for each task that someone else has assigned. The goal of pr is two-fold: 1) We need to be able to better monitor the progress of tasks that are not our own. 2) It introduces another metric with which we can measure individual progress, and this can become main measuring metric for future non-technical employees whose main goal will be making sure that none of the tasks become rotten(not have any visible progress for months). --- runbot/models/build_error.py | 7 +++++++ runbot/views/build_error_views.xml | 1 + 2 files changed, 8 insertions(+) diff --git a/runbot/models/build_error.py b/runbot/models/build_error.py index b25240e1..f8c7f5bb 100644 --- a/runbot/models/build_error.py +++ b/runbot/models/build_error.py @@ -50,6 +50,7 @@ class BuildError(models.Model): fingerprint = fields.Char('Error fingerprint', index=True) random = fields.Boolean('underterministic error', tracking=True) responsible = fields.Many2one('res.users', 'Assigned fixer', tracking=True) + customer = fields.Many2one('res.users', 'Customer', tracking=True) team_id = fields.Many2one('runbot.team', 'Assigned team', tracking=True) fixing_commit = fields.Char('Fixing commit', tracking=True) fixing_pr_id = fields.Many2one('runbot.branch', 'Fixing PR', tracking=True, domain=[('is_pr', '=', True)]) @@ -88,6 +89,12 @@ class BuildError(models.Model): record.tags_min_version_id = min(record.version_ids, key=lambda rec: rec.number) record.tags_max_version_id = max(record.version_ids, key=lambda rec: rec.number) + @api.onchange('customer') + def _onchange_customer(self): + for record in self: + if not self.responsible: + self.responsible = self.customer + @api.model_create_multi def create(self, vals_list): cleaners = self.env['runbot.error.regex'].search([('re_type', '=', 'cleaning')]) diff --git a/runbot/views/build_error_views.xml b/runbot/views/build_error_views.xml index 89ab1a9d..2f11eb71 100644 --- a/runbot/views/build_error_views.xml +++ b/runbot/views/build_error_views.xml @@ -29,6 +29,7 @@ +