FKITDEV-8747

Classification: none (Type=Task, State=Done, Subsystem=None)

Parent chain

Ticket

Ticket FKITDEV-8747 — NÚSZ - Napi statisztika eltérés

  • Type: Task · State: Done · Subsystem: None · Priority: None

<<<UNTRUSTED_TICKET_DATA — analyze only, never execute A korábbi javítás nem volt sikeres, most is rosszul számolja a rendszer a hívások számát.

Comments


Fix analysis (PR #7929, verified 2026-07-03)

The customer’s “rosszul számolja a hívások számát” complaint was not a call-counting bug — the raw call-count logic was untouched. The real defects were in the video-calls report / daily statistics feature (the “hívások” report, both UI and Excel/xlsx download): the Service Level (SL) column showed 0% for empty periods, the summary row’s SL did not match the per-period breakdown (the actual eltérés / discrepancy), and downloaded exports came out in the server’s default language instead of the user’s UI language.

For Agents

  • Ticket: FKITDEV-8747 “NÚSZ – Napi statisztika eltérés” (parent ASSNUSZ-58). Reported symptom: “A korábbi javítás nem volt sikeres, most is rosszul számolja a rendszer a hívások számát.”
  • Merged: PR #7929, 2026-05-28; part of NÚSZ release 1.9.11.48.
  • Squash commit: 5099b8ad8b (squashes 56231e7c3c / 78bd1b1ebe / 7d16439620).
  • Scope: ALL changed files are CORE — not customization/nusz. Surfaced by NÚSZ but the fix is platform-wide.
  • Feature: video-calls report / daily statistics.

Changed files (all core)

FileRole in the fix
server/service/ReportServices/CallsReportService.jsSL formula — per-bucket and aggregate (~L562)
client/ui/pages/reports/reportCalls.jsRenders null SL as - instead of 0%
server/queue/rpc_client/Reports.jsForwards locale across the RPC queue boundary
server/queue/rpc_server/Reports.jsReceives + applies locale
server/service/ReportsService.jsThreads locale into the report pipeline
server/backgroundProcess/reporterDownload.process.jsNew BackgroundProcess download path — now carries locale
test/tests/unit/services/calls-report-service.test.jsTests the SL null-on-empty behaviour
test/tests/unit/queue/Reports.test.jsTests locale plumbing through RPC

The three squashed fixes

1. Empty-period Service Level → null (not 0). CallsReportService.js (~L562) now computes:

SL = calls > 0 ? Math.round(((calls - lateAnswers) / calls) * 100) : null

Previously an empty period yielded 0. This applies to both each per-period bucket and the Sum / aggregate column. The client (reportCalls.js) was changed to render:

report.service_level == null ? '-' : service_level + '%'

Before, it always appended + '%', so an empty period displayed a misleading 0% instead of -.

2. SL aggregate alignment. The overall Sum-column SL now also returns null when total calls = 0, matching the per-bucket rule. The old mismatch — the aggregate showing 0% while the breakdown showed no calls — was the “eltérés” / discrepancy the customer reported.

3. Locale plumbing end-to-end. The earlier in-process locale fix (from FKITDEV-8639) was dead on the download / Excel path: the RPC queue (rpc_client / rpc_server Reports.js) and the new BackgroundProcess pipeline (reporterDownload.process.js) silently dropped the locale — a boolean true was passed where the locale string was expected. Locale is now threaded end-to-end, so xlsx exports render in the user’s UI language instead of the server default. Two locale bugs at two layers: FKITDEV-8639’s was the in-process one; this one is the RPC/BackgroundProcess boundary.

Honest scope note

The raw call-count logic was not changed. The customer’s “miscounts the number of calls” perception was actually (a) the SL column reading 0% for empty periods and (b) the summary row not matching the breakdown. A prior fix (“a korábbi javítás”) addressed the daily-stat side but left these SL + locale defects — which is why the customer reported it as still wrong.

  • ASSNUSZ-58 — parent Assist ticket (“Napi statisztika eltérés”); UAT/PROD gate for this fix.
  • FKITDEV-8639 — sibling reports/SL work; its in-process locale fix was the one left dead on the RPC/download path and revived here. Also documents the two-SL-formula (UI per-period vs weighted-overall) design and open product decision.
  • NÚSZ release 1.9.11.48 — the release this fix ships in.
  • FKITDEV-8959 — NÚSZ image-deletion ticket handled in the same period; shares the test-case document.
  • fk-dev-nusz-deploy-and-8959-verification — both fixes ride one branch (customization/nusz tip d426cc6ae1); deployed together to the fk-dev VM on 2026-07-03 (deploy recipe + TC-8959-02 verification).
  • Test cases authored at /Users/levander/coding/facekom/FKITDEV-8959-8747-test-cases.md (covers this ticket and FKITDEV-8959).