Solved How to Add my own New status fields?
-
I would like to add a new status field, how I can achieve this?
-
For this query you just need to make some few changes to do this.
1. Add all status to your database table uv_ticket_status as we have added two new status here in below image in database table.
2. Now locate file vendor->uvdesk->core-framework->Repository->TicketRepository.php open TicketRepository.php and reach to getTicketTabDetails() function.
$data = array(1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0);
Add new entries in $data array here as we have added 7 and 8.3. Finally locate vendor->uvdesk->core-framework->Resources->views->ticketList.html.twig
open ticketList.html.twig and go to line 134 add new status elements here.<li>
<a href="#" data-id="7" class="uv-aside-nav-active"><span class="name">{{ 'Hold'|trans }}</span><span class="uv-flag-gray">0</span></a>
</li>
<li>
<a href="#" data-id="8" class="uv-aside-nav-active"><span class="name">{{ 'Coming'|trans }}</span><span class="uv-flag-gray">0</span></a>
</li>
and provide the data-id as same as in database.You can make this changes and the things will work as expected.
Thanks,