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

776 ungewollte api änderung bei stimmabgabevermerken #800

Merged

Conversation

Nic12345678
Copy link
Contributor

@Nic12345678 Nic12345678 commented Feb 10, 2025

Beschreibung:

Im Unterschied zum bisherigen Datenmodell aus WLS2.0 in dem unter Stimmabgabevermerke -> Wahldaten sich die Property "eingenommeneWahlscheine" befindet, wurde hier versehentlich "eingenommenewahlscheine" (klein "W") implementiert.

Dies wurde nun gem. dem vorhandenen Datenmodell korrigiert.

Definition of Done (DoD):

  • ist angepasst in DTO, Model und Entität

  • Datenbank wird mit neuem Flyway-Skript angepasst - nicht notwendig, da es nur eine Datenbanktabelle "EINGENOMMENEWAHLSCHEINE" durchgehend großgeschrieben existiert, also von der Änderung nicht betroffen ist.

Backend

  • Unit-Tests gepflegt

Referenziert: #776

Summary by CodeRabbit

  • Refactor
    • Standardized naming for ballot collection data across the system for improved consistency.
  • Tests
    • Updated unit and integration tests to align with the new naming standards.
  • Chore
    • Revised API request payloads to adopt the standardized field naming for improved clarity.

@Nic12345678 Nic12345678 linked an issue Feb 10, 2025 that may be closed by this pull request
2 tasks
Copy link
Contributor

coderabbitai bot commented Feb 10, 2025

Walkthrough

The changes in this pull request revert the naming of a property related to collected ballots to its original casing. Across several files—including domain classes, DTOs, service methods, test cases, and HTTP request JSON payloads—the property previously misnamed as eingenommenewahlscheine has been corrected to eingenommeneWahlscheine. The modifications ensure that both internal Java representations and external API contracts consistently use the original naming convention. No alterations to the underlying logic or data structures were made, and the changes are strictly limited to renaming for consistency and compliance with previous API specifications.

Assessment against linked issues

Objective Addressed Explanation
Ensure API compatibility by restoring original property name in DTO, Model, and Entity (#776)
Update the database with a new Flyway script (#776) No Flyway migration script changes were provided.

📜 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 f36fd4c and 2b0b083.

📒 Files selected for processing (8)
  • wls-ergebnismeldung-service/src/main/java/de/muenchen/oss/wahllokalsystem/ergebnismeldungservice/domain/stimmabgabevermerke/Wahldaten.java (1 hunks)
  • wls-ergebnismeldung-service/src/main/java/de/muenchen/oss/wahllokalsystem/ergebnismeldungservice/rest/stimmabgabevermerke/WahldatenDTO.java (1 hunks)
  • wls-ergebnismeldung-service/src/main/java/de/muenchen/oss/wahllokalsystem/ergebnismeldungservice/service/ergebnismeldung/ErgebnismeldungMappingService.java (1 hunks)
  • wls-ergebnismeldung-service/src/main/java/de/muenchen/oss/wahllokalsystem/ergebnismeldungservice/service/stimmabgabevermerke/WahldatenModel.java (1 hunks)
  • wls-ergebnismeldung-service/src/test/java/de/muenchen/oss/wahllokalsystem/ergebnismeldungservice/rest/stimmabgabevermerke/StimmabgabevermerkeControllerIntegrationTest.java (1 hunks)
  • wls-ergebnismeldung-service/src/test/java/de/muenchen/oss/wahllokalsystem/ergebnismeldungservice/rest/stimmabgabevermerke/StimmabgabevermerkeDTOMapperTest.java (2 hunks)
  • wls-ergebnismeldung-service/src/test/resources/sendErgebnismeldung.http (1 hunks)
  • wls-ergebnismeldung-service/src/test/resources/stimmabgabevermerke.http (3 hunks)
✅ Files skipped from review due to trivial changes (5)
  • wls-ergebnismeldung-service/src/test/java/de/muenchen/oss/wahllokalsystem/ergebnismeldungservice/rest/stimmabgabevermerke/StimmabgabevermerkeControllerIntegrationTest.java
  • wls-ergebnismeldung-service/src/main/java/de/muenchen/oss/wahllokalsystem/ergebnismeldungservice/service/stimmabgabevermerke/WahldatenModel.java
  • wls-ergebnismeldung-service/src/main/java/de/muenchen/oss/wahllokalsystem/ergebnismeldungservice/domain/stimmabgabevermerke/Wahldaten.java
  • wls-ergebnismeldung-service/src/main/java/de/muenchen/oss/wahllokalsystem/ergebnismeldungservice/rest/stimmabgabevermerke/WahldatenDTO.java
  • wls-ergebnismeldung-service/src/main/java/de/muenchen/oss/wahllokalsystem/ergebnismeldungservice/service/ergebnismeldung/ErgebnismeldungMappingService.java
🔇 Additional comments (3)
wls-ergebnismeldung-service/src/test/resources/stimmabgabevermerke.http (1)

23-23: LGTM! Property renamed correctly.

The property has been consistently renamed from "eingenommenewahlscheine" to "eingenommeneWahlscheine" across all JSON payloads, aligning with the WLS2.0 data model.

Also applies to: 57-57, 104-104

wls-ergebnismeldung-service/src/test/resources/sendErgebnismeldung.http (1)

140-140: LGTM! Property renamed correctly.

The property has been renamed from "eingenommenewahlscheine" to "eingenommeneWahlscheine" in the JSON payload, maintaining consistency with the WLS2.0 data model.

wls-ergebnismeldung-service/src/test/java/de/muenchen/oss/wahllokalsystem/ergebnismeldungservice/rest/stimmabgabevermerke/StimmabgabevermerkeDTOMapperTest.java (1)

85-85: LGTM! Method references updated correctly.

The method references in the lambda expressions have been updated from "eingenommenewahlscheine" to "eingenommeneWahlscheine", maintaining consistency with the renamed property. The test logic remains unchanged and continues to verify the correct mapping of enum values.

Also applies to: 155-155

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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 or `` to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or `` 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.

@Nic12345678 Nic12345678 self-assigned this Feb 10, 2025
@MrSebastian MrSebastian self-requested a review February 11, 2025 07:20
@Nic12345678 Nic12345678 merged commit b504cd9 into dev Feb 11, 2025
5 checks passed
@Nic12345678 Nic12345678 deleted the 776-ungewollte-api-änderung-bei-stimmabgabevermerken branch February 11, 2025 07:36
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.

ungewollte API Änderung bei Stimmabgabevermerken
2 participants