Support

Akeeba Ticket System

#40568 Menu Items Category view - Show open & Pending by default?

Posted in ‘Akeeba Ticket System for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
4
PHP version
8.3
Akeeba Ticket System version
5.3.5

Latest post by dunwin on Friday, 12 April 2024 06:16 CDT

dunwin

 Please look at the bottom of this page (under Support Policy Summary) for our support policy summary, containing important information regarding our working hours and our support policy. Thank you!

When we display tickets, the default is all tickets are shown including Closed tickets

We can then select if we want to see just Open and Pending.

But it would be nice if we could just see the Open and Pending by default.

Is this possible? I can't see where we can set this.

Kind regards

David

 

 David Unwin - London UK

nicholas
Akeeba Staff
Manager

There is the Latest Open Tickets view which shows all open tickets across all categories.

The tickets views in the front- and backend need to display all tickets by default. Otherwise, you could never clear the filters.

That's because of how applying a default selection works. When the developer asks the Joomla framework for the filter state, Joomla takes a look at its user session storage. If the value is empty, it uses and returns the default selection. If the value is non-empty, it returns the non-empty value.

Since we have a multi-value filter, the case of no value set, and no selection has been made (filters have been cleared by the user) look identical from the perspective of the framework. Therefore, the user deselecting all filters would result in the default filters being applied all over again. You would never be able to display all tickets!

Things get messier when you realise that PHP is not a stateful language, and site navigation is non-linear. That is to say, we can't define the "user entered category X" event in any deterministic way. You can't say if the user visited a page that's not category X or one of its tickets he has exited category X, therefore we need to reset the filters. Why? Because the user can have a hundred tabs open, each one navigating a different category, but all using the same user session. Therefore we can't write code which only applies the default filters "the first time" the user visits category X because this event is indeterminate -- even more so when Remember Me is used to stay logged in.

And that's why you don't get the option to select default filters. They are unenforceable in any way that is not counter-intuitive and maddening to the user.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

dunwin

Hi Nicholas,

Wow.... I thought is might be a simple answer.

Thank you for taking the time to explain the reasons why we can't have a default.

Kind regards

David

 David Unwin - London UK

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!