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

fix(j-s): Defender Case Info #16024

Merged
merged 2 commits into from
Sep 17, 2024
Merged

fix(j-s): Defender Case Info #16024

merged 2 commits into from
Sep 17, 2024

Conversation

gudjong
Copy link
Member

@gudjong gudjong commented Sep 16, 2024

Defender Case Info

Sameina mál - Verjandi/sækjandi hafa sömu info-card sýn og dómurinn

What

  • Removes appeal deadline info when an indictment case does not end in a ruling. This also applies to prosecutors who review completed indictments.
  • Displays the mother court case id for merged indictment cases.
  • Fixes the state tag in case lists for merged indictment cases.

Why

  • Verified bug.

Screenshots / Gifs

Defender Info Card:

image

Defender Case List:

image

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Summary by CodeRabbit

  • New Features

    • Introduced a mergeCase field in the Limited Access Case query for retrieving additional case details.
    • Added a new case state option "MERGE" to enhance case management capabilities.
  • Bug Fixes

    • Updated conditions for displaying the InfoCardClosedIndictment component to ensure accurate rendering based on case ruling status.
  • Documentation

    • Enhanced the identifier and default message for the completed state of a case to reflect the new "MERGE" option.

@gudjong gudjong requested a review from a team as a code owner September 16, 2024 14:32
Copy link
Contributor

coderabbitai bot commented Sep 16, 2024

Walkthrough

The pull request introduces several changes aimed at enhancing the functionality of the judicial system's case management features. Key modifications include the addition of a mergeCase association in the limited access case service, updates to the GraphQL query to retrieve merged case details, and revisions to case state identifiers and messages. Furthermore, the display logic for the InfoCardClosedIndictment component has been refined to include specific conditions based on the case's ruling decision.

Changes

File Change Summary
.../limitedAccessCase.service.ts Added mergeCase association with Case model in the include array, enhancing data retrieval for limited access cases.
.../limitedAccessCase.graphql Introduced mergeCase field in the LimitedAccessCase query with subfields id and courtCaseNumber for additional case details.
.../TagCaseState.strings.ts Renamed completed state identifier to completed_v2 and updated default message to include "MERGE" as a valid case state option.
.../IndictmentOverview/IndictmentOverview.tsx Updated conditions for displaying InfoCardClosedIndictment to include checks for CaseIndictmentRulingDecision.RULING alongside user role validations.

Possibly related PRs

  • feat(j-s): Create ruling confirmation #15894: This PR introduces a new function for creating ruling confirmations, which may relate to the handling of case data and rulings, similar to the mergeCase functionality added in the main PR.
  • fix(j-s): Indictment Appeal #15906: This PR modifies the handling of indictment verdict information, which could be relevant to the changes made in the main PR regarding case associations and data retrieval.
  • feat(j-s): Confirmed court records #15921: This PR enhances the functionality for generating confirmed court records, which may connect to the broader context of case management and the inclusion of related case data in the main PR.
  • fix(j-s): Allow prison system users to see rulings #15935: This PR allows prison system users to see rulings, which could relate to the changes in case visibility and data associations introduced in the main PR.
  • fix(j-s): Merge Email #16011: This PR addresses case conclusions when an indictment is closed as a merge, which directly relates to the mergeCase functionality introduced in the main PR.

Suggested labels

automerge


Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between eea93c5 and 71b7381.

Files selected for processing (1)
  • apps/judicial-system/backend/src/app/modules/case/limitedAccessCase.service.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/judicial-system/backend/src/app/modules/case/limitedAccessCase.service.ts

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
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 generate interesting stats about this repository and render them as a table.
    -- @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 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 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.
Early access features: enabled

We are currently testing the following features in early access:

  • OpenAI o1 for code reviews: OpenAI's new o1 model is being tested for generating code suggestions in code reviews.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

Copy link

codecov bot commented Sep 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 36.77%. Comparing base (e77487b) to head (71b7381).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...s/Shared/IndictmentOverview/IndictmentOverview.tsx 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #16024   +/-   ##
=======================================
  Coverage   36.77%   36.77%           
=======================================
  Files        6733     6734    +1     
  Lines      138103   138063   -40     
  Branches    39239    39216   -23     
=======================================
- Hits        50783    50777    -6     
+ Misses      87320    87286   -34     
Flag Coverage Δ
judicial-system-backend 55.20% <ø> (ø)
judicial-system-web 28.71% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../src/app/modules/case/limitedAccessCase.service.ts 72.07% <ø> (ø)
...rc/components/TagCaseState/TagCaseState.strings.ts 100.00% <ø> (ø)
...s/Shared/IndictmentOverview/IndictmentOverview.tsx 0.00% <0.00%> (ø)

... and 16 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e77487b...71b7381. Read the comment docs.

@datadog-island-is
Copy link

Datadog Report

All test runs 5a2a67f 🔗

88 Total Test Services: 0 Failed, 86 Passed
🔻 Test Sessions change in coverage: 2 decreased, 2 increased, 196 no change

Test Services
This report shows up to 10 services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
air-discount-scheme-backend 0 0 0 81 0 32.46s N/A Link
air-discount-scheme-web 0 0 0 2 0 9.09s 1 no change Link
api 0 0 0 4 0 3.08s N/A Link
api-catalogue-services 0 0 0 23 0 13.17s N/A Link
api-domains-air-discount-scheme 0 0 0 6 0 17.61s N/A Link
api-domains-assets 0 0 0 3 0 11.18s N/A Link
api-domains-auth-admin 0 0 0 18 0 11.82s 1 no change Link
api-domains-communications 0 0 0 5 0 34.28s N/A Link
api-domains-criminal-record 0 0 0 5 0 10.03s 1 no change Link
api-domains-driving-license 0 0 0 23 0 31.62s N/A Link

🔻 Code Coverage Decreases vs Default Branch (2)

  • nest-feature-flags - jest 57.3% (-0.47%) - Details
  • services-university-gateway - jest 44.85% (-0.03%) - Details

@gudjong gudjong added the automerge Merge this PR as soon as all checks pass label Sep 17, 2024
@kodiakhq kodiakhq bot merged commit e8480d9 into main Sep 17, 2024
43 of 44 checks passed
@kodiakhq kodiakhq bot deleted the j-s/fix-defender-infocard branch September 17, 2024 08:55
@coderabbitai coderabbitai bot mentioned this pull request Oct 7, 2024
6 tasks
@coderabbitai coderabbitai bot mentioned this pull request Oct 28, 2024
6 tasks
@coderabbitai coderabbitai bot mentioned this pull request Dec 5, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants