Task #19365
openCharge Template - Duplicate Charge Appears in Charge Template After Save (Intermittent Issue)
0%
Description
In the Charge Template module, when saving a charge (e.g., Document Fee), the same charge sometimes appears twice in the charge list after saving.
This issue is intermittent and difficult to consistently reproduce. It was first observed at Logideals and has since occurred again at United Cargo.
The duplication occurs without the user intentionally adding the charge twice, indicating a potential issue with save logic, UI refresh, or duplicate submission handling.
Steps Observed (Intermittent)
- Navigate to Charge Template
- Click to Add New Charge Template
- Add a charge (e.g., Doc Fee)
- Click Save
- Observe that the same charge appears twice in the charge list (occasionally)
Expected Result
- The charge is saved once and appears only once in the charge list.
Actual Result
- The same charge appears twice after saving.
Acceptance Criteria
No Duplicate Charges
- On saving a charge in Charge Template:
- The charge appears only once in the list.
- Duplicate entries are not created, even on repeated or rapid save actions.
Idempotent Save
- Multiple save triggers (double-click, latency, refresh) do not create duplicate charge records.
Data Integrity
- Backend enforces uniqueness to prevent duplicate charge creation for the same template.
Stability
- Fix addresses intermittent behaviour and remains stable across repeated testing.
GitLab Sync Log
[{"id": "38137", "author": "Avisham", "hours": 1.0, "created": "2026-02-04T09:57:16.250Z", "log_date": "2026-02-03", "comment": "Imported from GitLab by @Avisham on 2026-02-04T09:57:16.250Z: 1h-(1.0)h spend at: 2026-02-03", "status": "active", "deleted_by": "", "redmine_entry_id": 12153}]
Updated by Redmine Admin 27 days ago
- Status changed from New to Development Done
- GitLab Time Logged changed from 0 to 3600