CA Service Management

 View Only
  • 1.  Change default sorting on list_cr_wf.htmpl page

    Posted Oct 26, 2018 02:35 PM

    Hi all,

     

    Been looking to change default sorting when loading list_cr_wf.htmpl page after searching for workflow tasks on Incident/Request/Problems. I would like default sorting to be : cr and then sequence, newest tickets first (Incident/Request or Problem) and then "Sequence" (from the smallest number to the highest)

     

    Example:

    Request number | Sequence

    29384 | 10

    29384 | 20

    29288 | 10

    29288 | 20

    29288 | 30

     

    And so on... now the default sorting is only on Sequence and requests numbers are shown randomly (when reloading a page it gets different order)

     

    I tried on a separate environment changing default sorting order on "cr_wf" object itself (cr and then sequence) (everything list in the domsets tab) and then restart pdm_publish and starting again. Everything still works but no changes.


    I tried also setting a sorting condition on the column itself, but not sure it works well.

    <PDM_MACRO name=lsCol hdr="Seq." attr=sequence sort="sequence ASC, cr.persid desc">

     

    Anyone tried that before?

     

    In a request, it has to remain sorted by Sequence also as all tasks are shown in a request (4.2 tab)

     

    Thanks



  • 2.  Re: Change default sorting on list_cr_wf.htmpl page

    Posted Oct 29, 2018 12:53 PM

    Hi

    can you share here your modified domset with the sort?

    /J



  • 3.  Re: Change default sorting on list_cr_wf.htmpl page

    Posted Nov 12, 2018 11:05 AM

    Hi Jerome,

     

    Is there a way to extract the information to a text file? Because I know how to get the data from the schema in the WSP but actually making 8 print screen would be heavy to send.


    Which values are important in the domset? For cr_wf I have loginuser_list, MLIST_DYNAMIC, MLIST_STATIC,RLIST_DYNAMIC, RLIST_STATIC, scoreboard_user_bin, wf_list and wf_list2.

     

    Thank you



  • 4.  RE: Change default sorting on list_cr_wf.htmpl page

    Posted Jul 24, 2022 11:34 PM
    Edited by STUART MATTHEWS Jul 24, 2022 11:40 PM
    Hi Benoit, if you are still around did you get this working? ​I also don't want sequence number to be the default sort of the "Request/Incident/Problem Workflow List" (list_cr_wf.hmpl ) form, except for when you are looking at the workflow tab on the parent request/incident/problem.


  • 5.  RE: Change default sorting on list_cr_wf.htmpl page

    Posted Nov 22, 2022 06:06 PM
    Does anyone know how to sort on Ref Number or Open Date, or anything other than "Seq" on the list_cr_wf.htmpl form, when viewed via the scoreboard /lsCol (Request/Incident/Problem Workflow List) ?


  • 6.  RE: Change default sorting on list_cr_wf.htmpl page

    Posted Nov 23, 2022 02:49 AM
    Yes, but you need to modify the majic definition of the DOMSET used in the list. You can find the default definitions in the $NX_ROOT/bopcfg/majic/*.maj files; to modify one of them you'll need to override it with a custom .maj file in $NX_ROOT/site/mods/majic.

    Here's an example for Requests.

    OBJECT cr {
    // call request list with no limits
    DOMSET cr_list "open_date desc, ref_num desc" "" DYNAMIC ;
    } ;




  • 7.  RE: Change default sorting on list_cr_wf.htmpl page

    Posted Nov 24, 2022 03:51 AM
    Edited by Michael Mueller Nov 24, 2022 03:51 AM
    Hi Stuart.
    What you are looking for is a so called "nested" sorting.
    In the above mentioned sorting requirement,
    • having the ootb "Request(Incident/Problem Workflow List"
      • sorted by column "Request" descending
      • and nested column "Sequence" ascending,
      • by default,
    the following will help (tested in 17.3):
    Create a file named cr_wf_sorting.mod in NX_ROOT/site/mods/majic
    Content:
    MODIFY FACTORY cr_wf {
        DOMSET MLIST_STATIC 'sequence=cr desc+sequence asc,cr=cr.ref_num,helper=cr+sequence,assignee=assignee.last_name,start_date,wf_template=wf_template.id' '' STATIC;
    };

    Due to spaces and length the above line is broken in two lines.
    The DOMSET line should be in one line only. There is a space between ...+sequence and asc,...
    SDM needs to be restarted to make this active.

    This setting changes the ootb default SORT BY clause 
    from 'sequence,cr=cr.ref_num,helper=cr+sequence,assignee=assignee.last_name,start_date,wf_template=wf_template.id'
    to     'sequence=cr desc+sequence asc,cr=cr.ref_num,helper=cr+sequence,assignee=assignee.last_name,start_date,wf_template=wf_template.id'

    As you can see, for nested sorting you need to use the plus (+) character.
    The equation sequence=... is needed to map this sorting to the "Seq" column in the GUI so that the sorting arrow of this column gets initialized.

    Hope this helps and works
    ...Michael


  • 8.  RE: Change default sorting on list_cr_wf.htmpl page

    Posted Nov 27, 2022 05:50 PM
    Thanks heaps Michael, the enhancement requirement is a little tricky as we want a sort on ref_num on the list_cr_wf.htmpl when viewed via the scoreboard, and list_cr_wf.htmpl sorting by seq when viewing the workflow on the detail_cr.htmpl form.