-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix zms 1500 rename sum and fix calulation #874
Conversation
WalkthroughThe changes update the handling of report generation and data aggregation across multiple modules. In the Exchange class, the Changes
Sequence Diagram(s)sequenceDiagram
participant C as Client
participant RI as ReportRequestIndex
participant R as Renderer
C->>RI: send report request (readResponse)
RI->>RI: process request (check type, bypass report branch)
RI->>R: invoke Render::withHtml for index page
R->>C: return HTML response
Suggested reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
zmsentities/src/Zmsentities/Exchange.php
(2 hunks)zmsstatistic/src/Zmsstatistic/Download/RequestReport.php
(2 hunks)zmsstatistic/src/Zmsstatistic/ReportRequestIndex.php
(1 hunks)zmsstatistic/templates/page/reportRequestIndex.twig
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: call-build-images / build (zmsticketprinter, 8.0)
- GitHub Check: call-build-images / build (zmsstatistic, 8.0)
- GitHub Check: call-build-images / build (zmsmessaging, 8.0)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: call-build-images / build (zmscitizenapi, 8.0)
- GitHub Check: call-build-images / build (zmscalldisplay, 8.0)
- GitHub Check: call-build-images / build (zmsapi, 8.0)
- GitHub Check: call-build-images / build (zmsadmin, 8.0)
🔇 Additional comments (6)
zmsstatistic/src/Zmsstatistic/ReportRequestIndex.php (1)
48-56
:❓ Verification inconclusive
Verify the impact of removing the report download functionality.
The removal of the report response when
type
parameter is present could break the report download feature. Please ensure this change is intentional and verify that report downloads still work as expected.Run this script to check for any references to this download functionality:
🏁 Script executed:
#!/bin/bash # Search for references to report downloads rg -A 5 'type.*RequestReport'Length of output: 31
Impact of Removed Report Download Functionality
Our recent search for references to the download functionality (using “Download\RequestReport”) returned no results, which makes it difficult to fully gauge the impact of removing the early return when the
type
parameter is present. This change alters the control flow from directly sending a report response to continuing with HTML template rendering. Please verify that this change is intentional and that report downloads behave as expected under the new flow. In particular:
- Confirm that endpoints expecting a downloadable report still receive the correct response when the
type
parameter is set.- Ensure that any consumer or test case relying on the original report download behavior is updated or properly handled.
zmsstatistic/src/Zmsstatistic/Download/RequestReport.php (2)
94-110
: LGTM! Improved data collection logic.The changes improve type safety and data organization by:
- Using strict comparison for name checks
- Explicitly casting requestscount to integer
- Better structuring of row data
119-131
: LGTM! Well-structured summary row calculation.The implementation of the summary row calculation is clean and efficient, using Excel formulas for dynamic updates.
zmsstatistic/templates/page/reportRequestIndex.twig (2)
71-90
: LGTM! Improved sum calculation logic.The addition of
totalSum
calculation and its incremental update during iteration is clean and efficient.
126-134
: LGTM! Enhanced date-wise sum calculation.The implementation correctly calculates per-date sums across all entries.
zmsentities/src/Zmsentities/Exchange.php (1)
269-271
: LGTM! Enhanced type safety for requestscount.The addition of explicit type casting for requestscount ensures consistent integer values throughout the application.
Pull Request Checklist (Feature Branch to
next
):next
Branch in meinen Feature-Branch gemergt.Summary by CodeRabbit