[NAE-2401] Timestamp of case dataSet change#320
[NAE-2401] Timestamp of case dataSet change#320Kovy95 wants to merge 2 commits intorelease/6.4.2from
Conversation
- add lastModifiedDataSet property to case
- fix tests
|
Caution Review failedAn error occurred during the review process. Please try again later. WalkthroughA new property Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@projects/netgrif-components-core/src/lib/resources/interface/case.ts`:
- Line 24: The interface field lastModifiedDataSet is declared as a required
NaeDate but actual payloads and tests assign null, undefined, or empty arrays;
change its declaration to be optional and nullable (e.g., lastModifiedDataSet?:
NaeDate | null) in the interface to reflect real usage, and update any
tests/mocks (where [] is used) to use null/undefined or adjust mock data to
match the new nullable type; ensure references in panels.component.ts and
add-child-node.component.spec.ts still compile against lastModifiedDataSet?:
NaeDate | null.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: f4437736-9aff-4356-91c2-f0fce59eb241
📒 Files selected for processing (7)
projects/nae-example-app/src/app/doc/panels/panels.component.tsprojects/netgrif-components-core/src/lib/authorization/permission/permission.service.spec.tsprojects/netgrif-components-core/src/lib/panel/case-panel/abstract-case-panel.component.spec.tsprojects/netgrif-components-core/src/lib/resources/interface/case.tsprojects/netgrif-components-core/src/lib/utility/tests/mocks/mock-case-resource.service.tsprojects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-case.tsprojects/netgrif-components/src/lib/view/tree-case-view/tree-component/add-child-node/add-child-node.component.spec.ts
| * ] | ||
| */ | ||
| lastModified: NaeDate; | ||
| lastModifiedDataSet: NaeDate; |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Case interface declaration:"
rg -nP 'lastModifiedDataSet\s*:\s*NaeDate' projects/netgrif-components-core/src/lib/resources/interface/case.ts
echo
echo "Null/undefined assignments of lastModifiedDataSet in repository:"
rg -nP 'lastModifiedDataSet\s*:\s*(null|undefined)\b' --type ts
echo
echo "All explicit assignments for quick audit:"
rg -nP 'lastModifiedDataSet\s*:' --type tsRepository: netgrif/components
Length of output: 1540
🏁 Script executed:
# Check NaeDate type definition
rg -nP 'type NaeDate|interface NaeDate' --type ts
# Get context around null assignment in panels.component.ts
head -60 projects/nae-example-app/src/app/doc/panels/panels.component.ts | tail -10
# Get context around undefined assignment in add-child-node.component.spec.ts
head -70 projects/netgrif-components/src/lib/view/tree-case-view/tree-component/add-child-node/add-child-node.component.spec.ts | tail -10
# Check if there's any deserialization logic for Case
rg -n 'deserialize|fromJSON|fromResponse' projects/netgrif-components-core/src/lib/resources/interface/case.ts -A 3Repository: netgrif/components
Length of output: 755
🏁 Script executed:
# Check the complete case.ts interface to see all changes
cat -n projects/netgrif-components-core/src/lib/resources/interface/case.ts | head -50
# Check for deserialization or object mapping logic
rg -n 'lastModifiedDataSet' projects/netgrif-components-core/src/lib/resources -B 2 -A 2
# Check git to see what's being changed in this PR
git log --oneline -1 2>/dev/null || echo "Not a git repo"Repository: netgrif/components
Length of output: 2047
Make lastModifiedDataSet nullable/optional to match actual payloads and usage.
Line 24 declares a required NaeDate, but codebase usage assigns null (panels.component.ts), undefined (add-child-node.component.spec.ts), and [] in test/mock data. The required type declaration is inconsistent with actual field behavior and creates a type safety gap.
Suggested fix
- lastModifiedDataSet: NaeDate;
+ lastModifiedDataSet?: NaeDate | null;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| lastModifiedDataSet: NaeDate; | |
| lastModifiedDataSet?: NaeDate | null; |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@projects/netgrif-components-core/src/lib/resources/interface/case.ts` at line
24, The interface field lastModifiedDataSet is declared as a required NaeDate
but actual payloads and tests assign null, undefined, or empty arrays; change
its declaration to be optional and nullable (e.g., lastModifiedDataSet?: NaeDate
| null) in the interface to reflect real usage, and update any tests/mocks
(where [] is used) to use null/undefined or adjust mock data to match the new
nullable type; ensure references in panels.component.ts and
add-child-node.component.spec.ts still compile against lastModifiedDataSet?:
NaeDate | null.
|



Description
Implements NAE-2401
Dependencies
none
Third party dependencies
Blocking Pull requests
How Has Been This Tested?
manually
Test Configuration
<Please describe configuration for tests to run if applicable, like program parameters, host OS, VM configuration etc. You can use >
Checklist:
Summary by CodeRabbit