You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds visual styling (colors and icons) to the request_type enum field (incident and service_request) on the UserRequest class, specifically to improve the Simple Ticket display. The approach follows the existing pattern already used by status and priority enum fields in the same class — each value receives a <rank>, a <main_color>, a <complementary_color>, and a <decoration_classes> icon. The CSS variable references ($ibo-lifecycle-failure-state-* and $ibo-lifecycle-neutral-state-*) are already in use elsewhere in this same file, so no new theme variables are introduced.
Key findings:
The color semantic choices are reasonable: "incident" maps to failure/red tones (fas fa-exclamation) and "service_request" maps to neutral tones (fas fa-list-ul), consistent with how other alarm-style values are colored across the codebase.
<sort_type>rank</sort_type> is missing from the request_type field definition; without it the newly added <rank> elements will not affect the ordering of the dropdown values.
No <default_style> block has been added despite is_null_allowed=true and an empty default_value; the analogous status and priority fields in this class both carry a <default_style>, so its absence here may result in an unstyled badge when the field value is null.
Confidence Score: 5/5
Safe to merge; both remaining findings are style/completeness suggestions that do not break existing behavior.
All findings are P2. The color and icon additions are straightforward and follow the established pattern in the codebase. The missing sort_type means ranks are inert (same as pre-PR behavior), and the missing default_style only affects null-value rendering which was already unstyled before this change. Neither issue introduces a regression.
datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml — consider adding <sort_type>rank</sort_type> to the field definition and a <default_style> block.
Added rank and style blocks (color + icon) to the incident and service_request enum values of the request_type field; missing <sort_type>rank</sort_type> on the field definition and no <default_style> for the nullable field.
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[UserRequest object] --> B{request_type value}
B -->|incident| C[rank=10
failure-state colors
fas fa-exclamation]
B -->|service_request| D[rank=20
neutral-state colors
fas fa-list-ul]
B -->|null / empty| E[No default_style defined
⚠️ potentially unstyled]
C --> F[Badge rendered in UI]
D --> F
E --> G[Fallback rendering
undefined behavior]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Base information
Symptom (bug) / Objective (enhancement)
Put colors on User request field "request type" in Simple Ticket mode
Checklist before requesting a review
Checklist of things to do before PR is ready to merge