Change search parameter on Tickets main page

Hi all, looking for some guidance please…

On the main page of the Tickets module, instead of the Latest 10 New Tickets I would prefer it to default to Open (All) status. Is there a quick way to do this please?

TIA
Joowls.

Hi @Joowls1
There is no such option available.
There is already available the left menu list option that does the same thing though and you can use the bookmark module to add any frequently used list or screen

Hi @sonikf,

Thanks for your reply and suggestions.

I ended up changing the code in the index.php in the ticket folder, so that the code showed:

$sql .= " AND t.fk_statut = 3"; (the 3 was originally set to 0)

Thanks again for trying to help :grinning:

Hi @Joowls1

With this change you will only display tickets in progress.

You should change

$sql .= " AND t.fk_statut = 0";

to

$sql .= " AND t.fk_statut < 8";

and

print '<th class="right" colspan="2"><a href="'.DOL_URL_ROOT.'/ticket/list.php?search_fk_statut[]='.Ticket::STATUS_NOT_READ.'">'.$langs->trans("FullList").'</th>';

to

print '<th class="right" colspan="2"><a href="'.DOL_URL_ROOT.'/ticket/list.php?search_fk_statut[]='.openall.'">'.$langs->trans("FullList").'</th>';

Bear in mind that you have to to do this in every upgrade.

Hi @sonikf

Thanks for that :slight_smile: the first part works fine with “< 8”

However, if I paste in the second line of code you gave, then nothing shows in box. If I leave the original code there then the correct tickets are shown. What does the second line you sent do?

Best regards

Hi @Joowls1
You should make both of these changes.

The second one is the full list link to actually show all open tickets and not the default all unread
link

Hi @sonikf ,

Below is what I get when I add your second line of code:

Where as if I leave the original code in, it shows the open ticket that is on the system.

What is your version?

19.0.0
Is this too soon for this version?