Skip to content
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

Revert "Feature zmskvr 145 wartezeit statistik" #950

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

MoDaae
Copy link
Collaborator

@MoDaae MoDaae commented Mar 25, 2025

Reverts #923

Summary by CodeRabbit

  • Removed Features / Chores
    • Daily waiting statistics calculation has been removed, including its scheduling and command-line component.
  • Reporting Enhancements
    • Waiting time reports now use updated terminology (“measured time” and “calculated time”) and include additional metrics for spontaneous and scheduled customers.
  • Internal Updates
    • Process state tracking has been streamlined by eliminating redundant checks.
  • Tests
    • Expected outcomes have been updated to match the new waiting time calculations and report labels.

Copy link
Contributor

coderabbitai bot commented Mar 25, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request removes several conditional checks and script executions related to waiting statistics and process states across multiple modules. Specific logic related to updating arrival times and the "wasMissed" flag is eliminated. Several files undergo formatting improvements to enhance readability, and corresponding test assertions have been updated to reflect the changes. Additionally, the daily waiting statistics functionality and associated database migration components have been removed from the project.

Changes

File(s) Change Summary
zmsadmin/src/Zmsadmin/ProcessQueueReset.php, zmsapi/src/Zmsapi/ProcessFinished.php, zmsapi/src/Zmsapi/ProcessQueued.php, zmsapi/src/Zmsapi/ProcessRedirect.php, zmsapi/src/Zmsapi/WorkstationProcessDelete.php, zmsapi/src/Zmsapi/WorkstationProcessParked.php Removed or adjusted conditional checks: eliminated updating of queue’s arrivalTime and waitingTime, changed boolean arguments in status calls, removed missed process marking, and added a call to update waiting statistics.
zmsapi/cron/cronjob.daily, zmsdb/bin/calculateDailyWaitingStatistic, zmsdb/composer.json, zmsdb/migrations/91740644959-calculateDailyWaitingStatistic.sql, zmsdb/src/Zmsdb/Helper/CalculateDailyWaitingStatisticByCron.php Removed execution of daily waiting statistics calculations and deleted the associated script, composer entry, and SQL cron configuration.
zmsdb/migrations/91738315597-add-column-wasMissed-buerger.sql, zmsentities/schema/process.json, zmsentities/src/Zmsentities/Process.php, zmsdb/src/Zmsdb/Query/Process.php Removed the wasMissed column/property and associated methods, and simplified related process mapping and logic.
zmsdb/src/Zmsdb/Process.php Reformatted multiple method signatures and logging statements for improved readability without altering functionality.
zmsentities/tests/Zmsentities/ProcessTest.php, zmsstatistic/tests/Zmsstatistic/ReportWaitingDepartmentTest.php, zmsstatistic/tests/Zmsstatistic/ReportWaitingOrganisationTest.php, zmsstatistic/tests/Zmsstatistic/ReportWaitingScopeTest.php Updated test assertions with new expected values for waited seconds, minutes, arrivalTime, and HTML header labels, reflecting the reworked process and report behavior.
zmsstatistic/src/Zmsstatistic/Download/WaitingReport.php, zmsstatistic/templates/page/reportWaitingIndex.twig Added new report part entries (waitingcalculated and waitingcalculated_termin) and updated template labels by removing "(Max.)" suffixes and modifying terminology.

Sequence Diagram(s)

sequenceDiagram
    participant WS as Workstation Process Parked
    participant EW as ExchangeWaitingscope
    participant PROC as Process Entity

    WS->>PROC: Retrieve process data
    WS->>EW: updateWaitingStatistics(process, current time)
    WS->>PROC: Set status to "parked"
Loading
sequenceDiagram
    participant REP as WaitingReport
    participant DATA as Waiting Data Store
    participant UI as Report Template

    REP->>DATA: Fetch calculated waiting values
    DATA-->>REP: Return waitingcalculated data
    REP->>UI: Render report with updated labels
Loading

Suggested reviewers

  • ThomasAFink

Poem

I'm a rabbit with a joyful hop,
Skipping through code changes non-stop.
Removed old checks and cleaned the trail,
Waiting stats now less likely to fail.
With every line, my heart does gleam —
In this code garden, we all redeem!
🐇✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 782e8ab and bed9c46.

⛔ Files ignored due to path filters (3)
  • zmsapi/composer.lock is excluded by !**/*.lock
  • zmsdb/composer.lock is excluded by !**/*.lock
  • zmsdldb/composer.lock is excluded by !**/*.lock
📒 Files selected for processing (22)
  • zmsadmin/src/Zmsadmin/ProcessQueueReset.php (0 hunks)
  • zmsapi/cron/cronjob.daily (0 hunks)
  • zmsapi/src/Zmsapi/ProcessFinished.php (1 hunks)
  • zmsapi/src/Zmsapi/ProcessQueued.php (0 hunks)
  • zmsapi/src/Zmsapi/ProcessRedirect.php (2 hunks)
  • zmsapi/src/Zmsapi/WorkstationProcessDelete.php (0 hunks)
  • zmsapi/src/Zmsapi/WorkstationProcessParked.php (1 hunks)
  • zmsdb/bin/calculateDailyWaitingStatistic (0 hunks)
  • zmsdb/composer.json (0 hunks)
  • zmsdb/migrations/91738315597-add-column-wasMissed-buerger.sql (0 hunks)
  • zmsdb/migrations/91740644959-calculateDailyWaitingStatistic.sql (0 hunks)
  • zmsdb/src/Zmsdb/Helper/CalculateDailyWaitingStatisticByCron.php (0 hunks)
  • zmsdb/src/Zmsdb/Process.php (33 hunks)
  • zmsdb/src/Zmsdb/Query/Process.php (1 hunks)
  • zmsentities/schema/process.json (0 hunks)
  • zmsentities/src/Zmsentities/Process.php (2 hunks)
  • zmsentities/tests/Zmsentities/ProcessTest.php (3 hunks)
  • zmsstatistic/src/Zmsstatistic/Download/WaitingReport.php (2 hunks)
  • zmsstatistic/templates/page/reportWaitingIndex.twig (9 hunks)
  • zmsstatistic/tests/Zmsstatistic/ReportWaitingDepartmentTest.php (1 hunks)
  • zmsstatistic/tests/Zmsstatistic/ReportWaitingOrganisationTest.php (1 hunks)
  • zmsstatistic/tests/Zmsstatistic/ReportWaitingScopeTest.php (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@MoDaae MoDaae merged commit ff9e5f8 into next Mar 25, 2025
38 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant