Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
08e9b3ee
Commit
08e9b3ee
authored
11 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
Prefer settings from the email address setup
parent
50c02ff2
Branches
Branches containing commit
Tags
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
+22
-12
22 additions, 12 deletions
include/class.ticket.php
with
22 additions
and
12 deletions
include/class.ticket.php
+
22
−
12
View file @
08e9b3ee
...
@@ -2308,10 +2308,31 @@ class Ticket {
...
@@ -2308,10 +2308,31 @@ class Ticket {
if
(
$vars
[
'priorityId'
])
if
(
$vars
[
'priorityId'
])
$form
->
setAnswer
(
'priority'
,
null
,
$vars
[
'priorityId'
]);
$form
->
setAnswer
(
'priority'
,
null
,
$vars
[
'priorityId'
]);
// If the filter specifies a help topic which has a form associated,
// and there was previously either no help topic set or the help
// topic did not have a form, there's no need to add it now as (1)
// validation is closed, (2) there may be a form already associated
// and filled out from the original help topic, and (3) staff
// members can always add more forms now
// OK...just do it.
// OK...just do it.
$deptId
=
$vars
[
'deptId'
];
//pre-selected Dept if any.
$deptId
=
$vars
[
'deptId'
];
//pre-selected Dept if any.
$source
=
ucfirst
(
$vars
[
'source'
]);
$source
=
ucfirst
(
$vars
[
'source'
]);
// Apply email settings for emailed tickets. Email settings should
// trump help topic settins if the email has an associated help
// topic
if
(
$vars
[
'emailId'
]
&&
(
$email
=
Email
::
lookup
(
$vars
[
'emailId'
])))
{
$deptId
=
$deptId
?:
$email
->
getDeptId
();
$priority
=
$form
->
getAnswer
(
'priority'
);
if
(
!
$priority
||
!
$priority
->
getIdValue
())
$form
->
setAnswer
(
'priority'
,
null
,
$email
->
getPriorityId
());
if
(
$autorespond
)
$autorespond
=
$email
->
autoRespond
();
$email
=
null
;
$source
=
'Email'
;
}
// Intenal mapping magic...see if we need to override anything
// Intenal mapping magic...see if we need to override anything
if
(
isset
(
$topic
))
{
if
(
isset
(
$topic
))
{
$deptId
=
$deptId
?:
$topic
->
getDeptId
();
$deptId
=
$deptId
?:
$topic
->
getDeptId
();
...
@@ -2335,18 +2356,7 @@ class Ticket {
...
@@ -2335,18 +2356,7 @@ class Ticket {
$vars
[
'slaId'
]
=
$topic
->
getSLAId
();
$vars
[
'slaId'
]
=
$topic
->
getSLAId
();
}
}
// Apply email settings for emailed tickets
// Last minute checks
if
(
$vars
[
'emailId'
]
&&
(
$email
=
Email
::
lookup
(
$vars
[
'emailId'
])))
{
$deptId
=
$deptId
?:
$email
->
getDeptId
();
$priority
=
$form
->
getAnswer
(
'priority'
);
if
(
!
$priority
||
!
$priority
->
getIdValue
())
$form
->
setAnswer
(
'priority'
,
null
,
$email
->
getPriorityId
());
if
(
$autorespond
)
$autorespond
=
$email
->
autoRespond
();
$email
=
null
;
$source
=
'Email'
;
}
//Last minute checks
$priority
=
$form
->
getAnswer
(
'priority'
);
$priority
=
$form
->
getAnswer
(
'priority'
);
if
(
!
$priority
||
!
$priority
->
getIdValue
())
if
(
!
$priority
||
!
$priority
->
getIdValue
())
$form
->
setAnswer
(
'priority'
,
null
,
$cfg
->
getDefaultPriorityId
());
$form
->
setAnswer
(
'priority'
,
null
,
$cfg
->
getDefaultPriorityId
());
...
...
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