Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
1fe92c2c
Commit
1fe92c2c
authored
12 years ago
by
Peter Rotich
Browse files
Options
Downloads
Patches
Plain Diff
Add help topics to advanced search and csv export
parent
1f1dd038
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/ajax.tickets.php
+4
-0
4 additions, 0 deletions
include/ajax.tickets.php
include/class.export.php
+1
-0
1 addition, 0 deletions
include/class.export.php
include/staff/tickets.inc.php
+24
-2
24 additions, 2 deletions
include/staff/tickets.inc.php
with
29 additions
and
2 deletions
include/ajax.tickets.php
+
4
−
0
View file @
1fe92c2c
...
...
@@ -107,6 +107,10 @@ class TicketsAjaxAPI extends AjaxController {
if
(
$_REQUEST
[
'deptId'
])
$where
.
=
' AND ticket.dept_id='
.
db_input
(
$_REQUEST
[
'deptId'
]);
//Help topic
if
(
$_REQUEST
[
'topicId'
])
$where
.
=
' AND ticket.topic_id='
.
db_input
(
$_REQUEST
[
'topicId'
]);
//Status
switch
(
strtolower
(
$_REQUEST
[
'status'
]))
{
case
'open'
:
...
...
This diff is collapsed.
Click to expand it.
include/class.export.php
+
1
−
0
View file @
1fe92c2c
...
...
@@ -41,6 +41,7 @@ class Export {
'name'
=>
'From'
,
'priority_desc'
=>
'Priority'
,
'dept_name'
=>
'Department'
,
'helptopic'
=>
'Help Topic'
,
'source'
=>
'Source'
,
'status'
=>
'Current Status'
),
...
...
This diff is collapsed.
Click to expand it.
include/staff/tickets.inc.php
+
24
−
2
View file @
1fe92c2c
...
...
@@ -142,6 +142,12 @@ if($search):
$qwhere
.
=
' AND ticket.dept_id='
.
db_input
(
$_REQUEST
[
'deptId'
]);
$qstr
.
=
'&deptId='
.
urlencode
(
$_REQUEST
[
'deptId'
]);
}
//Help topic
if
(
$_REQUEST
[
'topicId'
])
{
$qwhere
.
=
' AND ticket.topic_id='
.
db_input
(
$_REQUEST
[
'topicId'
]);
$qstr
.
=
'&topicId='
.
urlencode
(
$_REQUEST
[
'topicId'
]);
}
//Assignee
if
(
isset
(
$_REQUEST
[
'assignee'
])
&&
strcasecmp
(
$_REQUEST
[
'status'
],
'closed'
))
{
...
...
@@ -273,7 +279,8 @@ $qselect.=' ,count(attach.attach_id) as attachments '
.
' ,IF(ticket.duedate IS NULL,IF(sla.id IS NULL, NULL, DATE_ADD(ticket.created, INTERVAL sla.grace_period HOUR)), ticket.duedate) as duedate '
.
' ,IF(ticket.reopened is NULL,IF(ticket.lastmessage is NULL,ticket.created,ticket.lastmessage),ticket.reopened) as effective_date '
.
' ,CONCAT_WS(" ", staff.firstname, staff.lastname) as staff, team.name as team '
.
' ,IF(staff.staff_id IS NULL,team.name,CONCAT_WS(" ", staff.lastname, staff.firstname)) as assigned '
;
.
' ,IF(staff.staff_id IS NULL,team.name,CONCAT_WS(" ", staff.lastname, staff.firstname)) as assigned '
.
' ,IF(ptopic.topic_pid IS NULL, topic.topic, CONCAT_WS(" / ", ptopic.topic, topic.topic)) as helptopic '
;
$qfrom
.
=
' LEFT JOIN '
.
TICKET_PRIORITY_TABLE
.
' pri ON (ticket.priority_id=pri.priority_id) '
.
' LEFT JOIN '
.
TICKET_LOCK_TABLE
.
' tlock ON (ticket.ticket_id=tlock.ticket_id AND tlock.expire>NOW()
...
...
@@ -282,7 +289,10 @@ $qfrom.=' LEFT JOIN '.TICKET_PRIORITY_TABLE.' pri ON (ticket.priority_id=pri.pri
.
' LEFT JOIN '
.
TICKET_THREAD_TABLE
.
' thread ON ( ticket.ticket_id=thread.ticket_id) '
.
' LEFT JOIN '
.
STAFF_TABLE
.
' staff ON (ticket.staff_id=staff.staff_id) '
.
' LEFT JOIN '
.
TEAM_TABLE
.
' team ON (ticket.team_id=team.team_id) '
.
' LEFT JOIN '
.
SLA_TABLE
.
' sla ON (ticket.sla_id=sla.id AND sla.isactive=1) '
;
.
' LEFT JOIN '
.
SLA_TABLE
.
' sla ON (ticket.sla_id=sla.id AND sla.isactive=1) '
.
' LEFT JOIN '
.
TOPIC_TABLE
.
' topic ON (ticket.topic_id=topic.topic_id) '
.
' LEFT JOIN '
.
TOPIC_TABLE
.
' ptopic ON (ptopic.topic_id=topic.topic_pid) '
;
$query
=
"
$qselect
$qfrom
$qwhere
$qgroup
ORDER BY
$order_by
$order
LIMIT "
.
$pageNav
->
getStart
()
.
","
.
$pageNav
->
getLimit
();
//echo $query;
...
...
@@ -616,6 +626,18 @@ $negorder=$order=='DESC'?'ASC':'DESC'; //Negate the sorting..
?>
</select>
</fieldset>
<fieldset>
<label
for=
"topicId"
>
Help Topic:
</label>
<select
id=
"topicId"
name=
"topicId"
>
<option
value=
""
selected
>
—
All Help Topics
—
</option>
<?php
if
(
$topics
=
Topic
::
getHelpTopics
())
{
foreach
(
$topics
as
$id
=>
$name
)
echo
sprintf
(
'<option value="%d" >%s</option>'
,
$id
,
$name
);
}
?>
</select>
</fieldset>
<fieldset
class=
"date_range"
>
<label>
Date Range:
</label>
<input
class=
"dp"
type=
"input"
size=
"20"
name=
"startDate"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment