This is a really nice breakdown.
I think you referenced lakshman as being correct when he is not however.
He indicated the order was:
1,4,6,3,5,2,7,8
But your test shows:
1,4,6,2,3,5,7,8
That is the order that I indicated was going to happen in my response when I said lakshman order/logic was wrong. The Due Date/Deadline is more important than the Priority. The statement by lakshman ‘Among those with Deadline, High priority>Normal>Low regardless of what the deadline is’ is incorrect.
I can also confirm that, via the API, a queue item defaults to High.
If you use the API
/odata/Queues/UiPathODataSvc.AddQueueItem
And add
{
"itemData": {
"Name": "TestQueue",
"SpecificContent": {},
"DeferDate": "2021-09-27T15:18:54.701Z",
"DueDate": "2021-09-27T15:18:54.701Z",
"RiskSlaDate": "2021-09-27T15:18:54.701Z",
"Reference": "Test",
"Progress": "Test"
}
}
The response you get is
{
"@odata.context": "/orchestrator_/odata/$metadata#QueueItems/$entity",
"QueueDefinitionId": 59788,
"OutputData": null,
"AnalyticsData": null,
"Status": "New",
"ReviewStatus": "None",
"ReviewerUserId": null,
"Key": "601a56d4-ed85-4037-99b6-37d8373ca8ba",
"Reference": "Test",
"ProcessingExceptionType": null,
"DueDate": "2021-09-27T15:18:54.701Z",
"RiskSlaDate": "2021-09-27T15:18:54.701Z",
"Priority": "High",
"DeferDate": "2021-09-27T15:18:54.701Z",
"StartProcessing": null,
"EndProcessing": null,
"SecondsInPreviousAttempts": 0,
"AncestorId": null,
"RetryNumber": 0,
"SpecificData": "{\"DynamicProperties\":{}}",
"CreationTime": "2021-09-27T15:20:27.495948Z",
"Progress": null,
"RowVersion": "AAAAABA+GY0=",
"OrganizationUnitId": 1098302,
"OrganizationUnitFullyQualifiedName": null,
"Id": 105393402,
"ProcessingException": null,
"SpecificContent": {},
"Output": null,
"Analytics": null
}
You can note in there the Priority is set to High and confirm by looking at the queue item.
The documentation I linked above it definitely wrong as it is clearly referencing incorrect column names and the Bulk Add Items action I would say also has a bug as the documentation clearly states that items added without a priority default to high yet your tests confirm it defaults to medium whereas the API behaves as expected.
I think its fair to say that I was correct if using the API, @jeevith is correct when using the bulk add items due to what we may consider is a bug in assigning priority and @lakshman is not correct under either circumstance due to a misunderstanding of the order of importance between priority and Due Date.