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
a0221ef1
Unverified
Commit
a0221ef1
authored
5 years ago
by
Peter Rotich
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #5157 from aydreeihn/issue/auto-assignment
Modify Reopen Assignment
parents
ed8b9cd7
d50ebbb1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/class.ticket.php
+19
-18
19 additions, 18 deletions
include/class.ticket.php
with
19 additions
and
18 deletions
include/class.ticket.php
+
19
−
18
View file @
a0221ef1
...
...
@@ -1363,7 +1363,24 @@ implements RestrictedAccess, Threadable, Searchable {
};
break
;
case
'open'
:
// TODO: check current status if it allows for reopening
if
(
$this
->
isClosed
()
&&
$this
->
isReopenable
())
{
// Auto-assign to closing staff or the last respondent if the
// agent is available and has access. Otherwise, put the ticket back
// to unassigned pool.
$dept
=
$this
->
getDept
();
$staff
=
$this
->
getStaff
()
?:
$this
->
getLastRespondent
();
$autoassign
=
(
!
$dept
->
disableReopenAutoAssign
());
if
(
$autoassign
&&
$staff
// Is agent on vacation ?
&&
$staff
->
isAvailable
()
// Does the agent have access to dept?
&&
$staff
->
canAccessDept
(
$dept
))
$this
->
setStaffId
(
$staff
->
getId
());
else
$this
->
setStaffId
(
0
);
// Clear assignment
}
if
(
$this
->
isClosed
())
{
$this
->
closed
=
$this
->
lastupdate
=
$this
->
reopened
=
SqlFunction
::
NOW
();
$ecb
=
function
(
$t
)
{
...
...
@@ -1701,24 +1718,8 @@ implements RestrictedAccess, Threadable, Searchable {
// We're also checking autorespond flag because we don't want to
// reopen closed tickets on auto-reply from end user. This is not to
// confused with autorespond on new message setting
if
(
$reopen
&&
$this
->
isClosed
()
&&
$this
->
isReopenable
())
{
if
(
$reopen
&&
$this
->
isClosed
()
&&
$this
->
isReopenable
())
$this
->
reopen
();
// Auto-assign to closing staff or the last respondent if the
// agent is available and has access. Otherwise, put the ticket back
// to unassigned pool.
$dept
=
$this
->
getDept
();
$staff
=
$this
->
getStaff
()
?:
$this
->
getLastRespondent
();
$autoassign
=
(
!
$dept
->
disableReopenAutoAssign
());
if
(
$autoassign
&&
$staff
// Is agent on vacation ?
&&
$staff
->
isAvailable
()
// Does the agent have access to dept?
&&
$staff
->
canAccessDept
(
$dept
))
$this
->
setStaffId
(
$staff
->
getId
());
else
$this
->
setStaffId
(
0
);
// Clear assignment
}
if
(
!
$autorespond
)
return
;
...
...
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