# Change search parameter on Tickets main page

**URL:** <https://www.dolibarr.org/forum/t/change-search-parameter-on-tickets-main-page/25095>\
**Category:** CRM/SRM Modules\
**Created:** [March 14, 2024, 4:08pm UTC](https://www.dolibarr.org/forum/t/change-search-parameter-on-tickets-main-page/25095 "2024-03-14T16:08:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joowls1](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/eada6e/32.png) [@Joowls1](https://www.dolibarr.org/forum/u/Joowls1)\
**Post date:** [March 14, 2024, 4:08pm UTC](https://www.dolibarr.org/forum/t/change-search-parameter-on-tickets-main-page/25095/1 "2024-03-14T16:08:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sonikf](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@sonikf](https://www.dolibarr.org/forum/u/sonikf)\
**Post date:** [March 14, 2024, 11:42pm UTC](https://www.dolibarr.org/forum/t/change-search-parameter-on-tickets-main-page/25095/2 "2024-03-14T23:42:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Joowls1](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/eada6e/32.png) [@Joowls1](https://www.dolibarr.org/forum/u/Joowls1)\
**Post date:** [March 15, 2024, 9:11am UTC](https://www.dolibarr.org/forum/t/change-search-parameter-on-tickets-main-page/25095/3 "2024-03-15T09:11:57Z")

</div>

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 😀

---

<div class="post-metadata">

**Author:** ![sonikf](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@sonikf](https://www.dolibarr.org/forum/u/sonikf)\
**Post date:** [March 17, 2024, 11:06am UTC](https://www.dolibarr.org/forum/t/change-search-parameter-on-tickets-main-page/25095/4 "2024-03-17T11:06:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Joowls1](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/eada6e/32.png) [@Joowls1](https://www.dolibarr.org/forum/u/Joowls1)\
**Post date:** [March 18, 2024, 10:53am UTC](https://www.dolibarr.org/forum/t/change-search-parameter-on-tickets-main-page/25095/5 "2024-03-18T10:53:44Z")

</div>

Hi @sonikf

Thanks for that 🙂 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

---

<div class="post-metadata">

**Author:** ![sonikf](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@sonikf](https://www.dolibarr.org/forum/u/sonikf)\
**Post date:** [March 18, 2024, 6:38pm UTC](https://www.dolibarr.org/forum/t/change-search-parameter-on-tickets-main-page/25095/6 "2024-03-18T18:38:49Z")

</div>

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](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/1/18db067d7d37b92d36e4b8985d2d7c607d53268f.png)

---

<div class="post-metadata">

**Author:** ![Joowls1](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/eada6e/32.png) [@Joowls1](https://www.dolibarr.org/forum/u/Joowls1)\
**Post date:** [March 18, 2024, 8:21pm UTC](https://www.dolibarr.org/forum/t/change-search-parameter-on-tickets-main-page/25095/7 "2024-03-18T20:21:07Z")

</div>

Hi @sonikf ,

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

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/2/258b8435a703f0fb41a6a5905d45fe172be6aac5.png)

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

---

<div class="post-metadata">

**Author:** ![sonikf](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@sonikf](https://www.dolibarr.org/forum/u/sonikf)\
**Post date:** [March 18, 2024, 8:36pm UTC](https://www.dolibarr.org/forum/t/change-search-parameter-on-tickets-main-page/25095/8 "2024-03-18T20:36:36Z")

</div>

What is your version?

---

<div class="post-metadata">

**Author:** ![Joowls1](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/eada6e/32.png) [@Joowls1](https://www.dolibarr.org/forum/u/Joowls1)\
**Post date:** [March 18, 2024, 11:21pm UTC](https://www.dolibarr.org/forum/t/change-search-parameter-on-tickets-main-page/25095/9 "2024-03-18T23:21:08Z")

</div>

19.0.0  
Is this too soon for this version?
