mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-31 01:35:15 +02:00
Updated How to create custom ticket lists (markdown)
parent
c694fd6630
commit
d88d6d9b49
@ -1,8 +1,10 @@
|
||||
To create custom ticket lists you have to be using v4.6.1+ of OpenSupports.
|
||||
|
||||
1. Open your `index.php` file
|
||||
2. Go inside `<body>` tag
|
||||
3. Create an array of objects called `window.customTicketList` in a `<script>` tag after `<div id="app"></div>`.Each element of the array represents a different custom list.
|
||||
**1**. Open your `index.php` file
|
||||
|
||||
**2**. Go inside `<body>` tag
|
||||
|
||||
**3**. Create an array of objects called `window.customTicketList` in a `<script>` tag after `<div id="app"></div>`.Each element of the array represents a different custom list.
|
||||
|
||||
Each object of the array `window.customTicketList` has to have this structure :
|
||||
> {
|
||||
@ -10,15 +12,35 @@ Each object of the array `window.customTicketList` has to have this structure :
|
||||
'filters': {}
|
||||
}
|
||||
|
||||
For example :
|
||||
>{
|
||||
'title': 'My First Custom List',
|
||||
'filters': {
|
||||
'priority': '[0,2]',
|
||||
'closed': 1,
|
||||
'query': 'dog'
|
||||
}
|
||||
}
|
||||
**4**. Save your file.
|
||||
|
||||
**5**. You should be able to see your custom lists in the admin panel in the ticket section.
|
||||
|
||||
***
|
||||
|
||||
|
||||
**Filters** :
|
||||
* **closed** : boolean
|
||||
* **unReadStaff** : boolean
|
||||
* **assigned** : boolean
|
||||
* **tags** : array of id's
|
||||
* **departments** : array of id's
|
||||
* **owners** : array of id's
|
||||
* **priority** : array of max 3 numbers options: (1/2/3)
|
||||
* **dateRange** : array of exactly 2 numbers, first date->last date (yyyymmddhhmm)
|
||||
* **authors** : array of objects, {id,staff} id of the author, boolean to determinate if is an user or a staff
|
||||
* **query** : string
|
||||
* **orderBy** : object, {value,asc} value to make the order (closed/owner_id/unread_staff/priority/date), boolean to determite direction of the order
|
||||
***
|
||||
|
||||
**Example** :
|
||||
>[ {
|
||||
'title': 'First List',
|
||||
'filters': { 'closed': 1, 'owners': '[22,2,15]', 'dateRange': '[201707100000,202003100000]', 'priority': '[0,1,2]','tags': '[6,8,17]', 'departments': '[5]','authors': "[{'id':1,'staff':1}]"}
|
||||
},
|
||||
{
|
||||
'title': 'Second List',
|
||||
'filters': { 'query': 'hi', 'assigned': 1 ,'unReadStaff': 1, 'orderBy': "{'value': 'closed', 'asc': 0}" }
|
||||
}
|
||||
]
|
||||
|
||||
4. Save your file.
|
||||
5. You should be able to see your custom lists in the admin panel in the ticket section.
|
Loading…
x
Reference in New Issue
Block a user