search cancel

Sort order in the Board views of Modern UX

book

Article ID: 242779

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

What is the default sort order in the Board views of the Modern UX?

Resolution

The sorting is done by "position" value.

A sample REST Call that is made while fetching a Board view is as below. Bolded text is the relevant part about the sorting question.

http://some_server/ppm/rest/v1/private/views/5124831?expand=(listColumns=(limit=500,sort=(position+asc),fields=(name,position,isSelected,metadataURL,pinned,sortOrder,sortPosition,width,groupType,isGrouped,layout)),viewSettings=(limit=200,fields=(layout,name,value,classifier)),viewTargets=(limit=500,fields=(attribute,position)))

The position value is determined from the odf_item_position table. You can determine which columns are in which position by running a query like the one below. The name of the attribute being used to form the columns of the Board will have to be provided.

SELECT
    ii.name item_name,
    ii.id item_id,
    oip.position item_position,
    cl.lookup_code board_columns,
    opd.name board_column_attributes
FROM
    odf_item_positions oip
    JOIN inv_investments ii ON ii.id = oip.instance_id
    JOIN odf_picklist_contexts opc ON opc.id = oip.context_id
    JOIN odf_picklist_defs opd ON opd.id = oip.picklist_def_id
    JOIN cmn_lookups cl ON cl.id = oip.lookup_id
WHERE
        oip.object_code = 'project'
    AND
        opd.name = 'Status'
ORDER BY
    cl.lookup_code,
    oip.position;