[FIX] forwardport: sync outstandings notification with page

In 81ce4ea02b the delta for PRs being
listed in the `/forwardport/outstanding` page was increased from 3
days to 7 (1 week), however the warning box in the home page still
used the old cutoffs leading to

An inconsistency between the two and an effective severe overcounting,
as the reason why the cutoff was increased to a week is forward ports
can take a while or the author / reviewer can be a touch busy at end
of week, so 3~4 days are routine when a PR is merged on thursday or
friday (and even worse if there's bank holidays in the mix).
This commit is contained in:
Xavier Morel 2023-08-14 08:00:56 +02:00
parent 7348e4d7a4
commit 62fb880a45

View File

@ -11,11 +11,11 @@
<t t-if="env['runbot_merge.pull_requests'].check_access_rights('read', False)">
<t t-set="outstanding" t-value="env['runbot_merge.pull_requests'].search_count([
('state', 'in', ['opened', 'validated', 'approved', 'ready', 'error']),
('source_id.merge_date', '&lt;', datetime.datetime.now() - relativedelta(days=3)),
('source_id.merge_date', '&lt;', datetime.datetime.now() - relativedelta(days=7)),
])"/>
<div t-if="outstanding != 0" class="alert col-md-12 alert-warning mb-0">
<a href="/forwardport/outstanding">
<t t-esc="outstanding"/> outstanding forward-ports
<t t-esc="outstanding"/> outstanding forward-ports (>1 week)
</a>
</div>
</t>