feat(heureka): wire Jira ticket to dedicated url field for risk acceptance#1702
Conversation
…iation Pass the risk acceptance source ticket as a plain string in the `url` field of `RemediationInput` instead of prepending it to `description`. Add `url` to the GraphQL mutation, query, and generated types. Surface the value in a new "Source Ticket" column in the remediations history panel for `risk_accepted` rows. Signed-off-by: Hoda Noori <[email protected]>
Signed-off-by: Hoda Noori <[email protected]>
…n and url cells Signed-off-by: Hoda Noori <[email protected]>
🦋 Changeset detectedLatest commit: 811b638 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
This PR updates the Heureka risk-acceptance flow to store the Jira/source ticket in the API’s dedicated Remediation.url field (instead of embedding it into description), and surfaces that value in the remediations history UI.
Changes:
- Extend remediations GraphQL query/mutation selections and generated types to include
url. - Update
RiskAcceptanceModalto send the source ticket viaRemediationInput.urland keepdescriptionas user-entered text. - Extend the remediations history panel to display a new “Source Ticket” column and normalize
url/remediatedByvalues.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/heureka/src/graphql/Remediations/getRemediations.graphql | Fetch url on remediations for UI display. |
| apps/heureka/src/graphql/Remediations/createRemediation.graphql | Request url in mutation result selection. |
| apps/heureka/src/generated/graphql.ts | Regenerated GraphQL types/documents to include url. |
| apps/heureka/src/components/Services/utils.ts | Add url to normalized remediation model and trim normalization. |
| apps/heureka/src/components/Service/ImageDetails/RiskAcceptanceModal/index.tsx | Populate RemediationInput.url from the source ticket field. |
| apps/heureka/src/components/Service/ImageDetails/ImageIssuesList/RemediationHistoryPanel/index.tsx | Add “Source Ticket” column and render url in the history table. |
…iations panel Signed-off-by: Hoda Noori <[email protected]>
Signed-off-by: Hoda Noori <[email protected]>
- Standardize date fallback from em dash to -- to match other columns - Show empty Source Ticket cell for non-risk_accepted remediation types - Update RiskAcceptanceModal tests: assert url field instead of old buildDescription behavior - Add RemediationHistoryPanel tests for Source Ticket column rendering Signed-off-by: Hoda Noori <[email protected]>
Signed-off-by: Hoda Noori <[email protected]>
… test Signed-off-by: Hoda Noori <[email protected]>
ArtieReus
left a comment
There was a problem hiding this comment.
@cloudoperators/juno-app-heureka and @cloudoperators/juno-app-greenhouse as patches, but I only see changes to the heureka app in the diff. You don't need to add a patch to greenhouse since heureka is already a dependency and the release will take care of increasing the version of the dependency.
Add sourceTicketError state, validation guard in handleConfirm, and required/invalid/errortext props on the Jira ticket TextInput so it behaves like the other required fields (description, user ID, expiration date). The confirm button stays disabled until all four fields are filled. Update tests accordingly: remove the now-unreachable "omits url when empty" case and add Jira ticket to all submit paths. Signed-off-by: Hoda Noori <[email protected]>
Signed-off-by: Hoda Noori <[email protected]>
Signed-off-by: Hoda Noori <[email protected]>
Signed-off-by: Hoda Noori <[email protected]>
Summary
The API's
Remediationtype exposes a dedicatedurlfield for storing a Jira/source ticket reference. This PR wires the existing Jira ticket input in the Risk Acceptance modal to that field, removing the previous workaround that embedded the ticket in thedescriptionstring. The ticket is now also surfaced as a dedicated "Source Ticket" column in the remediations history panel.Changes Made
urltoRemediationInputandRemediationin the generated GraphQL types,createRemediationmutation, andgetRemediationsqueryRiskAcceptanceModalto pass the Jira ticket as a plain string in theurlfield ofRemediationInputinstead of prepending it todescriptionurlto theRemediatedVulnerabilitytype andgetNormalizedRemediationsResponseutilityurlvalue--remediatedByandurlfields by normalizing with?.trim() || nullmin-w-0to description and source ticket cells to prevent text collision with adjacent columns01 Jan 2025)Related Issues
Screenshots (if applicable)
Testing Instructions
pnpm ipnpm TASKChecklist
PR Manifesto
Review the PR Manifesto for best practises.