← Back to Pull requests

[14.0] [MIG] Migrated fieldservice module. #695

Closed
Murtaza-OSI closed this pull request without merging on Mar 17, 2021 18:33 UTC
View on GitHub
Murtaza-OSI Murtaza-OSI commented on Jan 18, 2021 11:07 UTC
Author

No description provided by author.

Diff: 29234 lines (+29234 / -0) across 77 files Reviewer: hparfr Review duration: 83965m
All Vouch review confidence checks passed
Residual risk 0.32 = Change Risk (0.96) × (1 − Review Confidence (0.66)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.96 · 29234 lines diff across 77 files
0.96
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.28 · 5 substantive comment(s)
0.28
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
66%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Diff Size diff_size
0.400
Shallow Review Depth shallow_review_depth
0.251
Sensitive Paths sensitive_paths
0.096
Mass File Touch mass_file_touch
0.080
Empty Description empty_description
0.060
Real PR Conversation Timeline
10 items
hparfr hparfr commented on code on Jan 18, 2021 11:22 UTC
Code Review
fieldservice/models/fsm_order.py:1
@@ -377,6 +377,8 @@ def onchange_scheduled_date_end(self):
     @api.onchange("scheduled_duration")
     def onchange_scheduled_duration(self):
         if self.scheduled_duration and self.scheduled_date_start:
+            if self.scheduled_duration < 0:
+                raise ValidationError(_("Scheduled Duration Should be Postive Value"))

or = 0 ?

hparfr hparfr commented on code on Jan 18, 2021 11:23 UTC
Code Review
fieldservice/models/fsm_person.py:1
@@ -32,6 +34,10 @@ class FSMPerson(models.Model):
     mobile = fields.Char(string="Mobile")
     territory_ids = fields.Many2many("res.territory", string="Territories")
 
+    message_main_attachment_id = fields.Many2one(string="Main Attachment",

why ?

hparfr hparfr commented on code on Jan 18, 2021 11:25 UTC
Code Review
fieldservice/models/res_config_settings.py:1
@@ -88,12 +94,6 @@ class ResConfigSettings(models.TransientModel):
         readonly=False,
     )
 
-    # Dependencies
-    @api.onchange("group_fsm_equipment")
-    def _onchange_group_fsm_equipment(self):
-        if not self.group_fsm_equipment:
-            self.auto_populate_the_equipments = False
-

why only these two ?

hparfr hparfr requested changes on Jan 18, 2021 11:29 UTC
Changes Requested Reviewer

Thanks for this work.

Please also patch security rules.

<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>

<field name="domain_force">[('company_id', 'in', company_ids)]</field>

Murtaza-OSI Murtaza-OSI commented on code on Jan 20, 2021 06:09 UTC
Code Review
fieldservice/models/fsm_order.py:1
@@ -377,6 +377,8 @@ def onchange_scheduled_date_end(self):
     @api.onchange("scheduled_duration")
     def onchange_scheduled_duration(self):
         if self.scheduled_duration and self.scheduled_date_start:
+            if self.scheduled_duration < 0:
+                raise ValidationError(_("Scheduled Duration Should be Postive Value"))

The default value is zero so no need to check = into it.

hparfr hparfr commented on Feb 16, 2021 11:15 UTC
Contributor

Hi @Murtaza-OSI do you plan to work on this pr soon ?

hparfr hparfr commented on Feb 16, 2021 14:09 UTC
Contributor

Also please integrate the removal of partner_fax https://github.com/OCA/field-service/pull/693

brian10048 brian10048 commented on Feb 24, 2021 21:06 UTC
Contributor

Thank you for the work @Murtaza-OSI
Are you able to continue work on this PR?

What is reason to remove the two onchange methods in res_config_settings here ?

Why is the message_main_attachment_id field added in fsm_person here ?

Also can you remove partner_fax like we did in #693 to keep consistency between v13 and v14?

Thank you!
cc: @hparfr @bodedra

brian10048 brian10048 commented on Mar 17, 2021 18:33 UTC
Contributor

Superseded by #740

Reviewers
Assignees
Murtaza-OSI Murtaza-OSI
Labels
risk: low confidence: 66.4% reviewed sensitive_module
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 96% (HIGH) · Higher = larger blast radius
96%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 66.4% · Lower = rushed or shallow review
66.4%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 32.3% · Safe to merge
32.3%