Skip to content

feat(heureka): wire Jira ticket to dedicated url field for risk acceptance#1702

Merged
hodanoori merged 14 commits into
mainfrom
hoda-heureka-add-jira-ticket-url
May 20, 2026
Merged

feat(heureka): wire Jira ticket to dedicated url field for risk acceptance#1702
hodanoori merged 14 commits into
mainfrom
hoda-heureka-add-jira-ticket-url

Conversation

@hodanoori
Copy link
Copy Markdown
Contributor

@hodanoori hodanoori commented May 19, 2026

Summary

The API's Remediation type exposes a dedicated url field 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 the description string. The ticket is now also surfaced as a dedicated "Source Ticket" column in the remediations history panel.

Changes Made

  • Added url to RemediationInput and Remediation in the generated GraphQL types, createRemediation mutation, and getRemediations query
  • Updated RiskAcceptanceModal to pass the Jira ticket as a plain string in the url field of RemediationInput instead of prepending it to description
  • Added url to the RemediatedVulnerability type and getNormalizedRemediationsResponse utility
  • Added a "Source Ticket" column to the remediations history panel showing the url value
  • Updated all no-data fallback values in the remediations panel to use --
  • Fixed empty string fallback for remediatedBy and url fields by normalizing with ?.trim() || null
  • Applied min-w-0 to description and source ticket cells to prevent text collision with adjacent columns
  • Fixed date formatting in the remediations panel to always show a 2-digit day and 4-digit zero-padded year (e.g. 01 Jan 2025)

Related Issues

Screenshots (if applicable)

B44D6925-954A-4E1A-930D-7F4BA68BDADE

Testing Instructions

  1. pnpm i
  2. pnpm TASK

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • 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.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.
  • I have created a changeset for my changes.

PR Manifesto

Review the PR Manifesto for best practises.

hodanoori added 3 commits May 19, 2026 16:31
…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]>
@hodanoori hodanoori requested a review from a team as a code owner May 19, 2026 15:02
Copilot AI review requested due to automatic review settings May 19, 2026 15:02
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 19, 2026

🦋 Changeset detected

Latest commit: 811b638

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@cloudoperators/juno-app-heureka Patch
@cloudoperators/juno-app-greenhouse Patch

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

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

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 RiskAcceptanceModal to send the source ticket via RemediationInput.url and keep description as user-entered text.
  • Extend the remediations history panel to display a new “Source Ticket” column and normalize url/remediatedBy values.

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.

hodanoori added 5 commits May 19, 2026 17:11
- 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]>
Copy link
Copy Markdown
Collaborator

@ArtieReus ArtieReus left a comment

Choose a reason for hiding this comment

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

@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.

hodanoori and others added 5 commits May 20, 2026 14:45
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]>
@hodanoori hodanoori added the greenhouse-pr-build Set this label to create a preview image which will automatically set the `greenhouse-pr-preview` label May 20, 2026
@github-actions github-actions Bot added the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label May 20, 2026
Copy link
Copy Markdown
Contributor

@taymoor89 taymoor89 left a comment

Choose a reason for hiding this comment

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

👍

@hodanoori hodanoori merged commit b2844e4 into main May 20, 2026
27 checks passed
@hodanoori hodanoori deleted the hoda-heureka-add-jira-ticket-url branch May 20, 2026 13:37
@github-actions github-actions Bot removed the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

greenhouse-pr-build Set this label to create a preview image which will automatically set the `greenhouse-pr-preview`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task](heureka): Wire Jira ticket to dedicated url field in createRemediation for risk acceptance

4 participants