Skip to content

[NAE-2401] Timestamp of case dataSet change#320

Merged
Kovy95 merged 6 commits intorelease/6.4.2from
NAE-2401
Apr 7, 2026
Merged

[NAE-2401] Timestamp of case dataSet change#320
Kovy95 merged 6 commits intorelease/6.4.2from
NAE-2401

Conversation

@Kovy95
Copy link
Copy Markdown
Contributor

@Kovy95 Kovy95 commented Apr 2, 2026

Description

  • add lastModifiedDataSet property to case

Implements NAE-2401

Dependencies

none

Third party dependencies

  • No new dependencies were introduced

Blocking Pull requests

  • There are no dependencies on other PR

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 >

Name Tested on
OS LinuxMint 22
Runtime Node 20.18.0
Dependency Manager NPM 10.8.2
Framework version Angular 13.3
Run parameters
Other configuration

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes have been checked, personally or remotely, with @...
  • I have commented my code, particularly in hard-to-understand areas
  • I have resolved all conflicts with the target branch of the PR
  • I have updated and synced my code with the target branch
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes:
    • Lint test
    • Unit tests
    • Integration tests
  • I have checked my contribution with code analysis tools:
  • I have made corresponding changes to the documentation:
    • Developer documentation
    • User Guides
    • Migration Guides

Summary by CodeRabbit

  • New Features
    • Added dataset modification timestamp tracking for cases so you can see when a case dataset was last changed.
  • Tests
    • Updated test fixtures and mocks to reflect the new dataset timestamp field.
  • Documentation
    • Changelog updated (v6.4.2) noting the new dataset timestamp feature.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 2, 2026

Walkthrough

A new lastModifiedDataSet property (type NaeDate | undefined) was added to the Case interface; corresponding test fixtures, mocks, and an example component initialization were updated to include this field.

Changes

Cohort / File(s) Summary
Interface
projects/netgrif-components-core/src/lib/resources/interface/case.ts
Added `lastModifiedDataSet: NaeDate
Tests & Mocks
projects/netgrif-components-core/src/lib/authorization/permission/permission.service.spec.ts, projects/netgrif-components-core/src/lib/panel/case-panel/abstract-case-panel.component.spec.ts, projects/netgrif-components-core/src/lib/utility/tests/mocks/mock-case-resource.service.ts, projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-case.ts, projects/netgrif-components/src/lib/view/tree-case-view/tree-component/add-child-node/add-child-node.component.spec.ts
Extended mocked case_ / Case objects to include lastModifiedDataSet (values: [] or undefined depending on fixture).
Example App
projects/nae-example-app/src/app/doc/panels/panels.component.ts
Initialized case_.lastModifiedDataSet (set to undefined) in PanelsComponent constructor.
Changelog
CHANGELOG.md
Added entry: NAE-2401 Timestamp of case dataSet change under version 6.4.2 (Added).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

Small

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'NAE-2401 Timestamp of case dataSet change' directly and clearly describes the main change—adding a new property 'lastModifiedDataSet' to track when a case's dataset was modified, which is reflected across all modified files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added the improvement New feature or request label Apr 2, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a 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

🤖 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

📥 Commits

Reviewing files that changed from the base of the PR and between 28679ae and e980c6a.

📒 Files selected for processing (7)
  • projects/nae-example-app/src/app/doc/panels/panels.component.ts
  • projects/netgrif-components-core/src/lib/authorization/permission/permission.service.spec.ts
  • projects/netgrif-components-core/src/lib/panel/case-panel/abstract-case-panel.component.spec.ts
  • projects/netgrif-components-core/src/lib/resources/interface/case.ts
  • projects/netgrif-components-core/src/lib/utility/tests/mocks/mock-case-resource.service.ts
  • projects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-case.ts
  • projects/netgrif-components/src/lib/view/tree-case-view/tree-component/add-child-node/add-child-node.component.spec.ts

Comment thread projects/netgrif-components-core/src/lib/resources/interface/case.ts Outdated
@coderabbitai coderabbitai Bot added the Small label Apr 7, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a 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

♻️ Duplicate comments (1)
projects/netgrif-components-core/src/lib/resources/interface/case.ts (1)

24-24: ⚠️ Potential issue | 🟠 Major

Avoid a required | undefined field in exported Case API.

Line 24 makes lastModifiedDataSet required while still allowing undefined. In TypeScript this is a compatibility footgun for object literals and can introduce breaking changes in a patch line. Prefer an optional field.

Suggested fix
-    lastModifiedDataSet: NaeDate | undefined;
+    lastModifiedDataSet?: NaeDate;
🤖 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 exported Case interface currently declares lastModifiedDataSet as a
required field unioned with undefined (lastModifiedDataSet: NaeDate |
undefined), which is a compatibility hazard; change this to an optional property
on the Case interface (lastModifiedDataSet?: NaeDate) so callers can omit it
without breaking object literal checks and update any references to treat it as
possibly absent instead of explicitly undefined.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CHANGELOG.md`:
- Line 23: Update the changelog entry that currently reads "Timestamp of case
dataSet change" (the NAE-2401 entry) to use natural-language spelling by
replacing "dataSet" with "dataset" so it reads "Timestamp of case dataset
change"; edit the CHANGELOG.md entry for NAE-2401 accordingly.

---

Duplicate comments:
In `@projects/netgrif-components-core/src/lib/resources/interface/case.ts`:
- Line 24: The exported Case interface currently declares lastModifiedDataSet as
a required field unioned with undefined (lastModifiedDataSet: NaeDate |
undefined), which is a compatibility hazard; change this to an optional property
on the Case interface (lastModifiedDataSet?: NaeDate) so callers can omit it
without breaking object literal checks and update any references to treat it as
possibly absent instead of explicitly undefined.
🪄 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: 9f10bf8b-f87c-4b9f-8ae8-f00d68ec2440

📥 Commits

Reviewing files that changed from the base of the PR and between e980c6a and 09f6e98.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • projects/nae-example-app/src/app/doc/panels/panels.component.ts
  • projects/netgrif-components-core/src/lib/resources/interface/case.ts

Comment thread CHANGELOG.md
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 7, 2026

@Kovy95 Kovy95 merged commit bb2a406 into release/6.4.2 Apr 7, 2026
10 of 11 checks passed
This was referenced Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement New feature or request Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant