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
d367a12e
Commit
d367a12e
authored
10 years ago
by
Peter Rotich
Browse files
Options
Downloads
Patches
Plain Diff
Ticket status change
Redirect to tickets listing page when a ticket is resolved or closed via status change.
parent
30e7a424
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/ajax.tickets.php
+10
-4
10 additions, 4 deletions
include/ajax.tickets.php
include/staff/templates/status-options.tmpl.php
+12
-3
12 additions, 3 deletions
include/staff/templates/status-options.tmpl.php
with
22 additions
and
7 deletions
include/ajax.tickets.php
+
10
−
4
View file @
d367a12e
...
@@ -789,16 +789,23 @@ class TicketsAjaxAPI extends AjaxController {
...
@@ -789,16 +789,23 @@ class TicketsAjaxAPI extends AjaxController {
}
}
}
}
$state
=
strtolower
(
$status
->
getState
());
if
(
!
$errors
&&
$ticket
->
setStatus
(
$status
,
$_REQUEST
[
'comments'
]))
{
if
(
!
$errors
&&
$ticket
->
setStatus
(
$status
,
$_REQUEST
[
'comments'
]))
{
if
(
!
strcasecmp
(
$status
->
getState
(),
'deleted'
)
)
{
if
(
$state
==
'deleted'
)
{
$msg
=
sprintf
(
'%s %s'
,
$msg
=
sprintf
(
'%s %s'
,
sprintf
(
__
(
'Ticket #%s'
),
$ticket
->
getNumber
()),
sprintf
(
__
(
'Ticket #%s'
),
$ticket
->
getNumber
()),
__
(
'deleted sucessfully'
)
__
(
'deleted sucessfully'
)
);
);
}
elseif
(
$state
!=
'open'
)
{
$msg
=
sprintf
(
__
(
'%s status changed to %s'
),
sprintf
(
__
(
'Ticket #%s'
),
$ticket
->
getNumber
()),
$status
->
getName
());
}
else
{
}
else
{
$msg
=
sprintf
(
$msg
=
sprintf
(
__
(
'Successfully changed ticket status to %s'
),
__
(
'%s status changed to %s'
),
__
(
'Ticket'
),
$status
->
getName
());
$status
->
getName
());
}
}
...
@@ -809,8 +816,7 @@ class TicketsAjaxAPI extends AjaxController {
...
@@ -809,8 +816,7 @@ class TicketsAjaxAPI extends AjaxController {
$errors
[
'err'
]
=
__
(
'Error updating ticket status'
);
$errors
[
'err'
]
=
__
(
'Error updating ticket status'
);
}
}
$state
=
$status
$state
=
$state
?:
$ticket
->
getStatus
()
->
getState
();
?
$status
->
getState
()
:
$ticket
->
getStatus
()
->
getState
();
$info
[
'status_id'
]
=
$status
$info
[
'status_id'
]
=
$status
?
$status
->
getId
()
:
$ticket
->
getStatusId
();
?
$status
->
getId
()
:
$ticket
->
getStatusId
();
...
...
This diff is collapsed.
Click to expand it.
include/staff/templates/status-options.tmpl.php
+
12
−
3
View file @
d367a12e
...
@@ -4,11 +4,13 @@ global $thisstaff, $ticket;
...
@@ -4,11 +4,13 @@ global $thisstaff, $ticket;
$actions
=
array
(
$actions
=
array
(
'closed'
=>
array
(
'closed'
=>
array
(
'icon'
=>
'icon-repeat'
,
'icon'
=>
'icon-repeat'
,
'action'
=>
'close'
'action'
=>
'close'
,
'href'
=>
'tickets.php'
),
),
'resolved'
=>
array
(
'resolved'
=>
array
(
'icon'
=>
'icon-ok-circle'
,
'icon'
=>
'icon-ok-circle'
,
'action'
=>
'resolve'
'action'
=>
'resolve'
,
'href'
=>
'tickets.php'
),
),
'open'
=>
array
(
'open'
=>
array
(
'icon'
=>
'icon-undo'
,
'icon'
=>
'icon-undo'
,
...
@@ -49,7 +51,14 @@ $actions= array(
...
@@ -49,7 +51,14 @@ $actions= array(
echo
sprintf
(
'#%s/status/%s/%d'
,
echo
sprintf
(
'#%s/status/%s/%d'
,
$ticket
?
(
'tickets/'
.
$ticket
->
getId
())
:
'tickets'
,
$ticket
?
(
'tickets/'
.
$ticket
->
getId
())
:
'tickets'
,
$actions
[
$status
->
getState
()][
'action'
],
$actions
[
$status
->
getState
()][
'action'
],
$status
->
getId
());
?>
"
><i
class=
" aaa
<?php
$status
->
getId
());
?>
"
<?php
if
(
isset
(
$actions
[
$status
->
getState
()][
'href'
]))
echo
sprintf
(
'data-href="%s"'
,
$actions
[
$status
->
getState
()][
'href'
]);
?>
><i
class=
"
<?php
echo
$actions
[
$status
->
getState
()][
'icon'
]
?:
'icon-tag'
;
echo
$actions
[
$status
->
getState
()][
'icon'
]
?:
'icon-tag'
;
?>
"
></i>
<?php
?>
"
></i>
<?php
echo
__
(
$status
->
getName
());
?>
</a>
echo
__
(
$status
->
getName
());
?>
</a>
...
...
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