Skip to content

feat(remediation): default sort with target date#1127

Open
tsim-sap wants to merge 3 commits intomainfrom
tsim-sap/issue-1124/default-sort-with-target-date
Open

feat(remediation): default sort with target date#1127
tsim-sap wants to merge 3 commits intomainfrom
tsim-sap/issue-1124/default-sort-with-target-date

Conversation

@tsim-sap
Copy link
Copy Markdown
Collaborator

@tsim-sap tsim-sap commented Mar 11, 2026

Description

Added default sort by earliestTargetRemediationDate. Adjusted existing tests, added a test for this feature.

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • ✅ Test

Related Tickets & Documents

Remove if not applicable

Added tests?

  • 👍 yes

Added to documentation?

  • 🤝 Documentation pages updated

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • 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
  • New and existing unit tests pass locally with my changes

@tsim-sap tsim-sap force-pushed the tsim-sap/issue-1124/default-sort-with-target-date branch from cf4a2d7 to 07db4b5 Compare March 11, 2026 15:25
@tsim-sap tsim-sap marked this pull request as ready for review March 11, 2026 15:26
@tsim-sap tsim-sap requested a review from drochow as a code owner March 11, 2026 15:26
Copilot AI review requested due to automatic review settings March 11, 2026 15:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new default ordering for vulnerabilities that incorporates the (aggregated) earliest target remediation date, and propagates the new ordering field through MariaDB ordering/cursor logic plus tests/docs.

Changes:

  • Introduce IssueEarliestTargetRemediationDate as a new OrderByField and add MariaDB column mapping for it.
  • Extend issue query/cursor generation to support ordering (and cursor encoding) by earliest target remediation date.
  • Update/extend tests and documentation to reflect the new default ordering behavior.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
internal/entity/order.go Adds a new order-by field constant for earliest target remediation date.
internal/database/mariadb/order.go Maps the new order-by field to the DB column alias used for ordering.
internal/database/mariadb/issue.go Adds SQL column projection + cursor wiring for earliest target remediation date.
internal/database/mariadb/cursor.go Extends issue cursor fields to include earliest target remediation date when ordered by it.
internal/database/mariadb/issue_test.go Updates pagination cursor helpers and adds an ordering test for earliest target remediation date.
internal/app/issue/issue_handler_test.go Adjusts mocks/tests to the updated WithIssue cursor signature.
internal/api/graphql/graph/baseResolver/vulnerability.go Updates the default ordering for vulnerabilities to include earliest target remediation date.
docs/ordering.md Attempts to document the new ordering field / DB column alias.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tsim-sap tsim-sap force-pushed the tsim-sap/issue-1124/default-sort-with-target-date branch 3 times, most recently from ebfb91a to 15292d5 Compare March 16, 2026 13:24
@tsim-sap tsim-sap requested a review from Copilot March 16, 2026 13:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@tsim-sap tsim-sap force-pushed the tsim-sap/issue-1124/default-sort-with-target-date branch 2 times, most recently from 9cfe886 to e2818f5 Compare March 19, 2026 15:36
@tsim-sap tsim-sap requested a review from Copilot March 19, 2026 15:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@tsim-sap tsim-sap force-pushed the tsim-sap/issue-1124/default-sort-with-target-date branch 3 times, most recently from 2381d6b to 621432d Compare March 25, 2026 15:37
@tsim-sap tsim-sap force-pushed the tsim-sap/issue-1124/default-sort-with-target-date branch from d775c80 to 56b0ecf Compare April 1, 2026 10:29
@tsim-sap tsim-sap requested a review from Copilot April 1, 2026 10:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

feat(vulnerability): default sort with target date

2 participants