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
a0dbfb8f
Commit
a0dbfb8f
authored
10 years ago
by
Peter Rotich
Browse files
Options
Downloads
Patches
Plain Diff
bug: Fix status display on client interface
parent
5ce12926
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/class.list.php
+1
-1
1 addition, 1 deletion
include/class.list.php
include/client/tickets.inc.php
+10
-17
10 additions, 17 deletions
include/client/tickets.inc.php
include/client/view.inc.php
+1
-15
1 addition, 15 deletions
include/client/view.inc.php
with
12 additions
and
33 deletions
include/class.list.php
+
1
−
1
View file @
a0dbfb8f
...
...
@@ -1015,7 +1015,7 @@ class TicketStatus extends VerySimpleModel implements CustomListItem {
}
function
__toString
()
{
return
$this
->
getName
();
return
__
(
$this
->
getName
()
)
;
}
static
function
create
(
$ht
)
{
...
...
This diff is collapsed.
Click to expand it.
include/client/tickets.inc.php
+
10
−
17
View file @
a0dbfb8f
...
...
@@ -6,13 +6,16 @@ $status=null;
if
(
isset
(
$_REQUEST
[
'status'
]))
{
//Query string status has nothing to do with the real status used below.
$qstr
.
=
'status='
.
urlencode
(
$_REQUEST
[
'status'
]);
//Status we are actually going to use on the query...making sure it is clean!
$status
=
strtolower
(
$_REQUEST
[
'status'
]);
switch
(
strtolower
(
$_REQUEST
[
'status'
]))
{
case
'open'
:
$results_type
=
__
(
'Open Tickets'
);
case
'closed'
:
$status
=
strtolower
(
$_REQUEST
[
'status'
]);
$results_type
=
__
(
'Closed Tickets'
);
break
;
case
'resolved'
:
$results_type
=
__
(
'Resolved Tickets'
);
break
;
default
:
$status
=
''
;
//ignore
}
...
...
@@ -43,7 +46,7 @@ $$x=' class="'.strtolower($order).'" ';
$qselect
=
'SELECT ticket.ticket_id,ticket.`number`,ticket.dept_id,isanswered, '
.
'dept.ispublic, subject.value as subject,'
.
'dept_name,status.name as status, ticket.source, ticket.created '
;
.
'dept_name,
status.name as status,
status.state,
ticket.source, ticket.created '
;
$dynfields
=
'(SELECT entry.object_id, value FROM '
.
FORM_ANSWER_TABLE
.
' ans '
.
'LEFT JOIN '
.
FORM_ENTRY_TABLE
.
' entry ON entry.id=ans.entry_id '
.
...
...
@@ -127,7 +130,8 @@ $negorder=$order=='DESC'?'ASC':'DESC'; //Negate the sorting
if
(
$thisclient
->
getNumResolvedTickets
())
{
?>
<option
value=
"resolved"
<?php
echo
(
$status
==
'resolved'
)
?
'selected="selected"'
:
''
;
?>
>
Resolved (
<?php
echo
$thisclient
->
getNumResolvedTickets
();
?>
)
</option>
<?php
echo
(
$status
==
'resolved'
)
?
'selected="selected"'
:
''
;
?>
>
<?php
echo
__
(
'Resolved'
);
?>
(
<?php
echo
$thisclient
->
getNumResolvedTickets
();
?>
)
</option>
<?php
}
?>
...
...
@@ -168,24 +172,13 @@ $negorder=$order=='DESC'?'ASC':'DESC'; //Negate the sorting
if
(
$res
&&
(
$num
=
db_num_rows
(
$res
)))
{
$defaultDept
=
Dept
::
getDefaultDeptName
();
//Default public dept.
while
(
$row
=
db_fetch_array
(
$res
))
{
$ticketstatus
=
''
;
switch
(
$row
[
'status'
])
{
case
'open'
:
$ticketstatus
=
__
(
'open'
);
break
;
case
'closed'
:
$ticketstatus
=
__
(
'closed'
);
break
;
default
:
$ticketstatus
=
__
(
'open'
);
}
$dept
=
$row
[
'ispublic'
]
?
$row
[
'dept_name'
]
:
$defaultDept
;
$dept
=
$row
[
'ispublic'
]
?
$row
[
'dept_name'
]
:
$defaultDept
;
$subject
=
Format
::
htmlchars
(
Format
::
truncate
(
$row
[
'subject'
],
40
));
if
(
$row
[
'attachments'
])
$subject
.
=
' <span class="Icon file"></span>'
;
$ticketNumber
=
$row
[
'number'
];
if
(
$row
[
'isanswered'
]
&&
!
strcasecmp
(
$row
[
'stat
us
'
],
'open'
))
{
if
(
$row
[
'isanswered'
]
&&
!
strcasecmp
(
$row
[
'stat
e
'
],
'open'
))
{
$subject
=
"<b>
$subject
</b>"
;
$ticketNumber
=
"<b>
$ticketNumber
</b>"
;
}
...
...
@@ -196,7 +189,7 @@ $negorder=$order=='DESC'?'ASC':'DESC'; //Negate the sorting
href=
"tickets.php?id=
<?php
echo
$row
[
'ticket_id'
];
?>
"
>
<?php
echo
$ticketNumber
;
?>
</a>
</td>
<td>
<?php
echo
Format
::
db_date
(
$row
[
'created'
]);
?>
</td>
<td>
<?php
echo
ucfirst
(
$ticket
status
)
;
?>
</td>
<td>
<?php
echo
$row
[
'
status
'
]
;
?>
</td>
<td>
<a
href=
"tickets.php?id=
<?php
echo
$row
[
'ticket_id'
];
?>
"
>
<?php
echo
$subject
;
?>
</a>
</td>
...
...
This diff is collapsed.
Click to expand it.
include/client/view.inc.php
+
1
−
15
View file @
a0dbfb8f
...
...
@@ -43,21 +43,7 @@ if ($thisclient && $thisclient->isGuest()
<table
class=
"infoTable"
cellspacing=
"1"
cellpadding=
"3"
width=
"100%"
border=
"0"
>
<tr>
<th
width=
"100"
>
<?php
echo
__
(
'Ticket Status'
);
?>
:
</th>
<?php
$ticketstatus
=
''
;
switch
(
$ticket
->
getStatus
())
{
case
'open'
:
$ticketstatus
=
__
(
'open'
);
break
;
case
'closed'
:
$ticketstatus
=
__
(
'closed'
);
break
;
default
:
$ticketstatus
=
__
(
'open'
);
}
?>
<td>
<?php
echo
ucfirst
(
$ticketstatus
);
?>
</td>
<td>
<?php
echo
$ticket
->
getStatus
();
?>
</td>
</tr>
<tr>
<th>
<?php
echo
__
(
'Department'
);
?>
:
</th>
...
...
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