Thursday, March 28, 2024
2 changes · saas-17.1
Resolved issues and error corrections
This fixes an error that could occur when saving or updating a field service task assigned to multiple people at the same time as other tasks. It improves reliability for teams planning shared field service work and adds tests to help prevent the issue from returning.
Original PR description
Steps to reproduce: ------------------- 1. Create a first FSM task with an assignee (e.g. Mitchel Admin) and a planned date 2. Create a second FSM task with another assignee (e.g. Marc Demo) with the…
Steps to reproduce: ------------------- 1. Create a first FSM task with an assignee (e.g. Mitchel Admin) and a planned date 2. Create a second FSM task with another assignee (e.g. Marc Demo) with the same planned date as in the first task 3. Create a third FSM task with both assignees (e.g. Mitchel Admin and Marc Demo) with again, the same planned date 4. Save the third task or change anything in it 5. A traceback occurs Fix: ------------------- In the computed method "_compute_planning_overlap()", the "overlap_mapping" dictionary is iteratively updated with the data of the tasks of the users which overlap with the current one. When there were multiple assignees, it was possible that overlap_mapping[task_id] did not contain the user_id key of the assignee yet, hence the KeyError. To prevent that error, we check whether the user_id key exists and if not, we set it to an empty dictionary that will be filled in afterwards. Tests: ------------------- To be consistent with tests from TestPlanningOverlap in project_enterprise, the same test suite was reproduced for FSM tasks in TestFsmPlanningOverlap. task-3812556 version-17.1
The salary configurator now avoids overwriting employee personal information while benefits are being adjusted, only saving those details on final submission. New contracts generated from offers also use the job and department selected in the offer, ensuring contract documents reflect the intended role.