IBM Support

Workitem IDs are sorted alphabetically

Troubleshooting


Problem

Attempt to sort work item by ID using IBM Jazz Reporting Service results in sorting the numbers alphabetically.

Symptom

Steps to reproduce:

  1. Create workitems from 1 to 20 in IBM Rational Team Concert (RTC) client.
  2. Create in Report builder a report displaying all work items.
  3. Set sorting by ID in Format Results section.
  4. Run the report

Expected results:

The report displays the work items in the following order: 1, 2, 3 ... 20.

Actual results:

The report displays the work items in the following order: 1, 10, 11, 12 ... 2, 20, 3, 4, 5 ... 9.

Cause

Working as designed. Work item ID attribute is stored as a string, not as a number.

Resolving The Problem

WORKAROUND:

  1. Create the following Custom Expression in Format Results:
    • For Lifecycle Query Engine Data source:
      xsd:integer($Work Item:Id$)
    • For Data Warehouse Data source:
      • For Oracle:  TO_NUMBER($Workitem:ID$)
      • For DB2:  INTEGER($Workitem:ID$)
      • For SQL Server:  CAST($Workitem:ID$ AS INT)
      • For Derby: CAST($Workitem:ID$ AS INTEGER)
  2. Sort by this custom expression created.

[{"Product":{"code":"SSTU9C","label":"Jazz Reporting Service"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Report Builder","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0.4","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
29 September 2018

UID

swg22011064