Problem/Motivation

The TMGMT Job State Views field (`tmgmt_job_state`) currently displays the job state only as an icon.

While icons are useful for visual identification, there are use cases where displaying the textual state is more appropriate, particularly for accessibility, reporting, and Views where users need to clearly identify the job state.

There is currently no configuration option to choose between displaying the job state as an icon or as a label.

Steps to reproduce

1. Create or edit a Drupal View using TMGMT jobs.
2. Add the Job State field provided by TMGMT.
3. Configure the field and observe that the job state is always rendered as an icon.
4. There is no option to display the state as a textual label.

Proposed resolution

Add a Display option to the TMGMT Job State Views field configuration with the following options:

  • Icon - Display the existing state icon.
  • Label - Display the textual state label.

The default value should remain Icon to preserve the existing behaviour.

Remaining tasks

  • Add the Display option to the TMGMT Job State Views field.
  • Add support for rendering the state as a textual label.
  • Preserve the existing icon behaviour as the default.
  • Add or update automated tests for both display modes.

User interface changes

The Job State Views field configuration will provide a new Display option:

  • Icon
  • Label

The default option will be Icon.

API changes

NA

Data model changes

NA

Issue fork tmgmt-3628751

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

arunkumark created an issue. See original summary.

arunkumark’s picture

Assigned: arunkumark » Unassigned
Status: Active » Needs review

Created MR to achieve this feature. Now ready for Review.