Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-helpdesk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-helpdesk
Commits
2e0c9e4f
Commit
2e0c9e4f
authored
Jan 18, 2011
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- implemented escalation process
parent
f10f32fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
3 deletions
+101
-3
intranet-helpdesk-create.sql
sql/postgresql/intranet-helpdesk-create.sql
+1
-1
action.tcl
www/action.tcl
+7
-0
new.tcl
www/new.tcl
+93
-2
No files found.
sql/postgresql/intranet-helpdesk-create.sql
View file @
2e0c9e4f
...
...
@@ -751,8 +751,8 @@ where category_id = 30520;
SELECT
im_category_new
(
30530
,
'Re-Open'
,
'Intranet Ticket Action'
);
SELECT
im_category_new
(
30540
,
'Associate'
,
'Intranet Ticket Action'
);
SELECT
im_category_new
(
30550
,
'Escalate'
,
'Intranet Ticket Action'
);
...
...
www/action.tcl
View file @
2e0c9e4f
...
...
@@ -107,6 +107,13 @@ switch $action_id {
if
{
""
==
$tid
}
{
ad_returnredirect
$return
_url
}
ad_returnredirect
[
export_vars -base
"/intranet-helpdesk/associate"
{
tid
}]
}
30550
{
# Escalate
if
{
""
==
$tid
}
{
ad_returnredirect
$return
_url
}
if
{[
llength
$tid
]
> 1
}
{
ad_return_complaint 1
"
[
lang::message::lookup
""
intranet-helpdesk.Can_excalate_only_one_ticket
"
We can escalate only one ticket at a time"
]
"
}
ad_returnredirect
[
export_vars -base
"/intranet-helpdesk/new"
{
escalate_from_ticket_id
$tid
}]
}
30590
{
# Delete
foreach ticket_id
$tid
{
...
...
www/new.tcl
View file @
2e0c9e4f
...
...
@@ -36,6 +36,7 @@ if {![info exists task]} {
{
form_mode
"edit"
}
{
printer_friendly_p 0
}
{
render_template_id:integer 0
}
{
escalate_from_ticket_id 0
}
}
set show_components_p 1
...
...
@@ -64,6 +65,7 @@ if {![info exists task]} {
set mine_p
"all"
set render_template_id 0
set escalate_from_ticket_id 0
# Don't show this page in WF panel.
# Instead, redirect to this same page, but in TaskViewPage mode.
...
...
@@ -77,6 +79,9 @@ if {![info exists task]} {
}
set
escalate_from_ticket_id 53613
# ------------------------------------------------------------------
# Default & Security
# ------------------------------------------------------------------
...
...
@@ -98,6 +103,26 @@ set user_can_create_new_customer_contact_p 1
set
view_tickets_all_p
[
im_permission
$current
_user_id
"view_tickets_all"
]
# ------------------------------------------------------------------
# Create ticket as a copy of another ticket.
#
# Get SLA and type if we are copying data from an existing ticket
# ------------------------------------------------------------------
if
{
0 !=
$escalate
_from_ticket_id
}
{
db_0or1row copy_ticket_info
"
select p.project_name as copy_from_ticket_name,
p.parent_id as ticket_sla_id,
t.ticket_type_id
from im_tickets t,
im_projects p
where t.ticket_id = p.project_id and
t.ticket_id = :escalate_from_ticket_id
"
}
# ----------------------------------------------
# Page Title
...
...
@@ -105,10 +130,14 @@ set page_title [lang::message::lookup "" intranet-helpdesk.New_Ticket "New Ticke
if
{[
exists_and_not_null ticket_id
]}
{
set page_title
[
db_string title
"select project_name from im_projects where project_id = :ticket_id"
-default
""
]
}
if
{
0 !=
$escalate
_from_ticket_id
}
{
set page_title
[
lang::message::lookup
""
intranet-helpdesk.New_Ticket_escalated_from
"New Ticket escalated from '%copy_from_ticket_name%'"
]
}
if
{
""
==
$page
_title && 0 !=
$ticket
_type_id
}
{
set ticket_type
[
im_category_from_id
$ticket
_type_id
]
set page_title
[
lang::message::lookup
""
intranet-helpdesk.New_TicketType
"New %ticket_type%"
]
}
set context
[
list
$page
_title
]
...
...
@@ -178,7 +207,7 @@ ad_form \
-actions
$actions
\
-has_edit 1
\
-mode
$form
_mode
\
-export
{
next_url return_url
}
\
-export
{
next_url return_url
escalate_from_ticket_id
}
\
-form
{
ticket_id:key
{
ticket_name:text
(
text
)
{
label
$title
_label
}
{
html
{
size 50
}}}
...
...
@@ -476,6 +505,7 @@ set field_cnt [im_dynfield::append_attributes_to_form \
# Fix for problem changing to "edit" form_mode
set
form_action
[
template::form::get_action
"helpdesk_ticket"
]
if
{
""
!=
$form
_action
}
{
set form_mode
"edit"
}
set
next_ticket_nr
""
ad_form -extend -name helpdesk_ticket -on_request
{
...
...
@@ -485,6 +515,48 @@ ad_form -extend -name helpdesk_ticket -on_request {
set ticket_name
[
lang::message::lookup
""
intranet-helpdesk.Default_Ticket_Name
"Ticket
\#
%next_ticket_nr%"
]
}
if
{
0 !=
$escalate
_from_ticket_id
}
{
# Populate from another ticket
set sql
"
select t.*,
p.*
from im_projects p,
im_tickets t
where p.project_id = t.ticket_id and
p.project_id = :escalate_from_ticket_id
"
append ticket_name
" (escalated from
$copy
_from_ticket_name)"
# Get the fields in the form
set form_elements
[
template::form::get_elements helpdesk_ticket
]
# Execute the sql and write values into the form.
db_with_handle db
{
set selection
[
db_exec select
$db
query
$sql
1
]
while
{[
db_getrow
$db
$selection
]}
{
set col_names
[
ad_ns_set_keys
$selection
]
for
{
set
i 0
}
{
$i
<
[
ns_set size
$selection
]}
{
incr
i
}
{
set var
[
lindex
$col
_names
$i
]
set val
[
ns_set value
$selection
$i
]
ns_log Notice
"new: Copying from ticket #
$escalate
_from_ticket_id:
$var
=
$val
"
# Skip a number of variables that shouldn't be copied
if
{
"ticket_resolution_time"
==
$var
}
{
continue
}
# Write the value into the form if the form element exists
if
{[
lsearch
$form
_elements
$var
]
> -1
}
{
template::element::set_value helpdesk_ticket
$var
$val
}
}
}
}
db_release_unused_handles
}
}
-select_query
{
select t.*,
...
...
@@ -530,10 +602,29 @@ ad_form -extend -name helpdesk_ticket -on_request {
-notif_subject
$ticket
_name
\
-notif_text
$message
if
{[
info
exists escalate_from_ticket_id
]
&& 0 !=
$escalate
_from_ticket_id
}
{
# Add an escalation relationship between the two tickets
db_string add_ticket_ticket_rel
"
select im_ticket_ticket_rel__new (
null,
'im_ticket_ticket_rel',
:ticket_id,
:escalate_from_ticket_id,
null,
:current_user_id,
'
[
ad_conn peeraddr
]
',
0
)
"
}
# Write Audit Trail
im_project_audit -project_id
$ticket
_id -action create
# fraber 100928: Disabling return_url.
# For a new ticket it makes sense to be sent to the new ticket page...
ad_returnredirect
[
export_vars -base
"/intranet-helpdesk/new"
{
ticket_id
{
form_mode display
}}]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment