Everybody,

I could really use some expert help with the sortorder problem I mailed some time ago:

I have and INCIDENT (a problem) related to INCIDENTSTATUS (New, Open,
Accepted, etc.)

INCIDENT        TIMEREL         INCIDENTSTATUS
---------  -->       ------- -->  --------------
title           date            title ("New", "Open", etc.)
desc                            sortorder (integer such as 5, 10...)

Everytime the status of an incident changes a new timerel relation is
created with the appropriate incidentstatus. The problem occurs when I
need to display a list of incidents

1) with their last related status (via timerel date-field)
2) ordered by the incidentstatus sortorder-field, so I get all the New
incidents on top of the list, all Rejected items on the bottom, etc.

The problems lies in the fact that I need the list to retrieve FIRST the
most recent related incidentstatus and THEN order the whole list by the
sortorder-field of each last related status.

The following construction just doesn't do both, it doesn't take the
date field of the timerel into account.

<mm:listnodes type="incident">
        <c:set var="node"><mm:field name="number"/></c:set>
        <mm:relatednodescontainer path="incidentstatus" searchdirs="destination">
                <mm:sortorder field="sortorder" direction="up" />
                <mm:maxnumber value="1" />
                <mm:relatednodes>
                        <-- show incident node number-->
                        <mm:field name="${node}" />
                </mm:relatednodes>
        </mm:relatednodescontainer>
</mm:listnodes>


Is there a way to use the sortorder-field of the most recent timerel to order the entire list of incidents?

--
Regards,
Met vriendelijke groet,
Ted Vinke

First8 BV
Groenestraat 294
6531 JC Nijmegen
[EMAIL PROTECTED]


-- Met vriendelijke groet, Ted Vinke

First8 BV
Groenestraat 294
6531 JC Nijmegen
[EMAIL PROTECTED]



Reply via email to