Skip to content

Conversation

@bjorngoa
Copy link
Contributor

This pull request makes a small but important change to how urgency levels are mapped in the readUploadedFileAsText utility. Now, both UNABLE and IMPEDES urgency options are mapped to ServiceNowUrgency.NORMAL instead of CRITICAL and MODERATE, respectively.

  • Updated the mapping in getUrgencyNumber so that both UrgencyOption.UNABLE and UrgencyOption.IMPEDES now return ServiceNowUrgency.NORMAL instead of their previous higher urgency levels. (src/organisms/TopBar/Resources/Feedback/Feedback.utils.ts)

@bjorngoa bjorngoa requested a review from a team as a code owner December 15, 2025 13:50
@bjorngoa bjorngoa requested review from aslakihle and Copilot and removed request for Copilot December 15, 2025 13:50
@github-actions
Copy link

github-actions bot commented Dec 15, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 99.17% (🎯 100%) 16442 / 16578
🔵 Statements 99.17% (🎯 100%) 16442 / 16578
🔵 Functions 99.07% (🎯 100%) 1178 / 1189
🔵 Branches 99.31% (🎯 100%) 4030 / 4058
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/organisms/TopBar/Resources/Feedback/Feedback.utils.ts 100% 100% 100% 100%
Generated in workflow #2005 for commit 04a4977 by the Vitest Coverage Report Action

aslakihle
aslakihle previously approved these changes Dec 15, 2025
Copy link
Contributor

@aslakihle aslakihle left a comment

Choose a reason for hiding this comment

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

Want to bump version, or just let this be part of the next release?

Copy link
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 pull request updates the urgency level mapping for ServiceNow feedback submissions by downgrading both UNABLE and IMPEDES urgency options to map to ServiceNowUrgency.NORMAL instead of their previous higher severity levels.

Key Changes:

  • Modified urgency mapping so that UrgencyOption.UNABLE returns ServiceNowUrgency.NORMAL instead of CRITICAL
  • Modified urgency mapping so that UrgencyOption.IMPEDES returns ServiceNowUrgency.NORMAL instead of MODERATE
  • Bumped package version from 10.8.0 to 10.8.1

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/organisms/TopBar/Resources/Feedback/Feedback.utils.ts Updated getUrgencyNumber function to map both UNABLE and IMPEDES urgency options to NORMAL severity level
package.json Incremented patch version to 10.8.1 to reflect the urgency mapping changes
Comments suppressed due to low confidence (1)

src/organisms/TopBar/Resources/Feedback/Feedback.utils.ts:54

  • The getUrgencyNumber function lacks test coverage. Since the test file Feedback.utils.test.ts already contains tests for other utility functions like getSeverityEmoji, consider adding tests to verify the urgency mapping behavior, especially given this change in mapping logic.
export const getUrgencyNumber = (urgency: UrgencyOption) => {
  switch (urgency) {
    case UrgencyOption.UNABLE:
      return ServiceNowUrgency.NORMAL;
    case UrgencyOption.IMPEDES:
      return ServiceNowUrgency.NORMAL;
    case UrgencyOption.NO_IMPACT:
      return ServiceNowUrgency.NORMAL;
  }
};

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

@bjorngoa bjorngoa merged commit 8f2ab88 into main Dec 16, 2025
16 of 17 checks passed
@bjorngoa bjorngoa deleted the refactor/service-now-urgency-level-unable branch December 16, 2025 07:35
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.

3 participants