DB script for display the un-claimed Old task at top of the TaskList by default

Hi Team,

I have 5 Un-claimed filtered tasks are available in my TaskList.
If i click on Un-claimed filter then want to display very old task at the top of TaskList by default.

Note: I want to use DB script for sort the tasks.
can any one help on this…?

Thanks,

Hi @Purushotham,

the Filter REST API uses a task query under the hood: Create Filter | docs.camunda.org

Here you should be able to add an order statement to your query.

Hope this helps, Ingo

2 Likes

Hi @Ingo_Richtsmeier ,
Tried with DB script to sort the tasks ascending order but not working as expected.
please find the script for sort the tasks ascending.

INSERT Into ACT_RU_FILTER (ID_,REV_, RESOURCE_TYPE_, NAME_, QUERY_, PROPERTIES_) values (@ID, 5, 'Task', 'Sorting ASC order', '{"candidateGroup":"approver", "sorting":[{"sortBy":"created","sortOrder":"asc"}]}',
'{"variables":[{"name":"refNo","label":"RefNo"},{"name":"date","label":"Date"}]}');

In the URL still it is showing desc : /// sorting=%5B%7B"sortBy":“created”,“sortOrder”:“desc”%7D%5D

Could you please suggest how can i proceed with ascending order with DB script.

Thanks,