- Edited
Sorting by Due date not working correctly when choosing sort option. See image
However sorting by due date working fine if selecting by column title. See image
How to fix?
Sorting by Due date not working correctly when choosing sort option. See image
However sorting by due date working fine if selecting by column title. See image
How to fix?
I cannot replicate this issue using the latest pull from the develop-next
branch. Please download and use the latest pull from the develop-next
branch and retest your issue.
Cheers.
I added a new queue called due date.
I added the duedate column.
Instantly I see a difference from what you posted.
When I then sort on due date it appears to work fine.
Since due date does not appear to actually display the date... I can only conclude that you did not add a due date column.
@KevinTheJedi
I'm a novice programmer with beginner level php knowledge. Can you please provide step by step instructions?
I really don't have time but essentially you backup your entire site folder (just in case), backup your entire database (just in case), download the ZIP from the develop-next
branch from Github, unzip the ZIP, copy+replace all the contents of the upload/
folder into your current site folder, make sure the permissions/ownerships are correct, restart the webserver and PHP-FPM (if you're running FPM), and log out/log back in to osTicket.
Cheers.
Go to Open.
Click gear.
Click edit.
Click Columns tab.
Uncheck use standard columns.
Select Due Date in the Add a column drop down.
Click Add.
Click Save.
Click Done.
The Due Date column will appear.
Click on it to sort.
Don't like where it is?
Click on the gear.
Click Edit.
Click on the Columns tab.
Drag it in the list to where you want it.
Click Save.
Click Done.
KevinTheJedi
Hi!
I have the same problem.
osTicket 1.12
To reproduce, you have to have tickets both with "Due Date" automatically filled by SLA Plan ("Due Date" has not been manually edited) and tickets with "Due Date" manually edited.
As Queue column "Due Date" formed by 2 data sources (primary - Due Date, secondary - SLA Due Date (if primary is empty)), but Queue Sorting does not, thus Sort by Due Date working not correctly (column sorted by "SLA Due Date" only).
Sorting options must have the same logic (primary and secondary source for sorting) to working properly, or must refer to resulting values of "Due Date" column.
For clarity, I create custom queue with 3 Due Date columns:
1 - SLA Due Date - primary source "SLA Due Date", secondary source - empty,
2 - Due Date - primary source "Due Date", secondary - empty,
3 - Resulting Due Date - primary source "Due Date", secondary - "SLA Due Date" (as in original queue config).
In my example Due Date sorting refers to "SLA Due Date" field, so "SLA Due Date" column looks good sorted, but not "Resulting Due Date".
We see empty cells in "Due Date" column.
Neither sort by "SLA Due Date" nor "Due Date" does not give the expected result in "Resulting Due Date".
I can reproduce this as well. Its not possible to sort by duedate, if you not click on the column, like denisnos said.
Should I create an issue at github?
Latest version: 1.15.2
Hi Knud, did you ever open a Github issue for this?
Quite old thread. But you need to go to "manage queue sorting" and make a setting like this:
Then logout and back in. If it's not right, check the queue setting > Default sorting.
I was just messing about with it for ages. Yes it's related to the fact it needs to sort by SLA Due Date and Due Date I believe! Hope this helps!
Actually I am not sure it is sorted! It seems to always want to sort by "Last Updated". Although it does sort first by "Priority".
If I set the sorting as follows:
It will apparently sort by:
Therefore, to replicate the issue, you really need to set your sorting up AND update a ticket in such away that would affect the sorting as described above!
Example to illustrate is below.
The top ticket within "Normal" priority is too high according to the sort parameters I set. It is actually sorting by "Last Updated" before sorting by any due dates. This is despite "Last Updated" not being present within my sorting criteria (Admin > Settings >Tickets > Queues [select queue] > Sort > Config > Manage Sort Options.
It seems such a weird issue. I ended up creating a new queue. With all the same settings, and it was fine.
TBH - I think it is after you start messing with the sorting options as an agent. Once you start clicking individual column headers and sorting options, it seems to get "stuck" or remember these things and prioritise them over the system default ones set in the admin section.
I think the best way to overcome this issue is to prevent the agents from being able to change the sort order of the queues or columns.
Whether or not there is an easy way to do that, I do no know at this time.
EDIT - Its has gone to s**t again. since the tickets started getting updates to them. Seems to want to sort by "last updated" in some form or other, no matter what.
EDIT2 - Having carried out further analysis, it seems that a queue sorting option that is set as Due Date + SLA Due Date will sort by due date AND by SLA due date which to my logic are two different things. Hence, the combination of the two do not work well! I think the issue here is that people are expecting the system to sort all tickets by one date. I.e. if it has an SLA Due date set - use that. If it has a Due Date manually set - use that instead. But it is not. Instead it sorts the SLA Due date tickets and those with Due dates in separate logic, which would work better in two different queues or in queues where only one or the other is used.
Are running some sort of theme mod?