[18.0][IMP][BCKP] base_tier_validation: clearer notify_on_pending chatter body #1291
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.46) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.46 · 260 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.333
Real PR Conversation Timeline
1 comments
"Review active on #1291"
general
weight: 0.35
bofiltd
Backport of OCA/tier-validation#22 to 18.0.
Problem
The chatter message posted when a tier reaches `
pending(from
_notify_review_available) has two UX problems:1. Wrong attribution on later tiers.
self.env.user.nameinside
_notify_requested_review_bodyresolves to whichever usertriggered the promotion. On second-and-later tiers that is the
approver of the previous tier, not the person who pressed
Request Validation -- so the message credits the wrong user.
2. No way to tell who the message is for. Chatter system
notifications do not render the "Notified to" pill the way
user-typed comments do. A recipient seeing "A review has been
requested by Administrator" cannot tell whether it was meant for
them.
Fix
review.requested_by(set once atrequest_validationtime, never reassigned) so attribution is
Reuse the existing consistent across all tiers.
tier.review.todo_byfield for the assignee
label -- it already handles every review type (individual /
res.usersfield, group,res.groupsfield) with the same
New wording: "Review pending for Mike, requested by Administrator." abbreviation rules as the Reviews table.
Backwards-compatible:
_notify_requested_review_body()still workswith no arguments and returns the previous short body for any
downstream overrider that calls it that way.
Notes on backport scope
The upstream PR also extends
test_19a_notify_on_pending_sequence_negative,
which was introduced by its dependency OCA/tier-validation#21 and does
not exist on this branch (18.0's nearest equivalent,
test_19_waiting_tier, deliberately runs withnotify_on_pendingoff). Only the
test_20_no_sequenceadaptation -- which asserts theassignee and the original requester are present in the body -- has been
ported here.
Test plan
test_20_no_sequenceupdated to assert both the assignee(
review_1.todo_by) and the original requester(
review_1.requested_by`) are present in the chatter body.