Commit cac0038f authored by Frank Bergmann's avatar Frank Bergmann

- Added confirmation and signoff actions

parent a26de700
......@@ -847,6 +847,8 @@ SELECT im_category_new(30545, 'Change Prio', 'Intranet Ticket Action');
SELECT im_category_new(30550, 'Escalate', 'Intranet Ticket Action');
SELECT im_category_new(30552, 'Close Escalated Tickets', 'Intranet Ticket Action');
SELECT im_category_new(30560, 'Resolved', 'Intranet Ticket Action');
SELECT im_category_new(30565, 'Confirm Ticket', 'Intranet Ticket Action');
SELECT im_category_new(30570, 'Sign-Off Ticket', 'Intranet Ticket Action');
......@@ -861,8 +863,9 @@ SELECT im_category_new(30552, 'Close Escalated Tickets', 'Intranet Ticket Action
SELECT im_category_new(30560, 'Resolved', 'Intranet Ticket Action');
SELECT im_category_new(30590, 'Delete', 'Intranet Ticket Action');
SELECT im_category_new(30599, 'Nuke', 'Intranet Ticket Action');
update im_categories set aux_string1 = '/intranet-helpdesk/action-duplicated'
where category_id = 30520;
update im_categories set aux_string1 = '/intranet-helpdesk/action-duplicated' where category_id = 30520;
update im_categories set aux_string1 = '/intranet-helpdesk/action-confirmed' where category_id = 30565;
update im_categories set aux_string1 = '/intranet-helpdesk/action-signoff' where category_id = 30570;
update im_categories set category = 'Set status: Closed' where category_id = 30500; -- Close
......
# /packages/intranet-helpdesk/www/action-confirmed.tcl
#
# Copyright (C) 2003-2008 ]project-open[
#
# All rights reserved. Please check
# http://www.project-open.com/license/ for details.
ad_page_contract {
Mark tickets as "confirmed"
@author frank.bergmann@project-open.com
} {
{ tid:multiple ""}
{ ticket_ids {} }
{ return_url "/intranet-helpdesk/index" }
}
# ---------------------------------------------------------------
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [auth::require_login]
if { {} == $ticket_ids} {
set ticket_ids $tid
}
# Deal with funky input parameter combinations
if {![info exists tid]} { set tid {} }
if {0 == [llength $tid]} { ad_returnredirect $return_url }
# ---------------------------------------------------------------
# Perform the action
# ---------------------------------------------------------------
foreach ticket_id $tid {
# Write Audit Trail
im_audit -object_id $ticket_id -action before_update
db_transaction {
# Close the ticket
db_dml close_ticket "
update im_tickets
set ticket_confirmation_date = now()
where ticket_id = :ticket_id and
ticket_confirmation_date is null -- do not overwrite
"
}
# Write Audit Trail
im_audit -object_id $ticket_id -action after_update
}
ad_returnredirect $return_url
# /packages/intranet-helpdesk/www/action-confirmed.tcl
#
# Copyright (C) 2003-2008 ]project-open[
#
# All rights reserved. Please check
# http://www.project-open.com/license/ for details.
ad_page_contract {
Mark tickets as "confirmed"
@author frank.bergmann@project-open.com
} {
{ tid:multiple ""}
{ ticket_ids {} }
{ return_url "/intranet-helpdesk/index" }
}
# ---------------------------------------------------------------
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [auth::require_login]
if { {} == $ticket_ids} {
set ticket_ids $tid
}
# Deal with funky input parameter combinations
if {![info exists tid]} { set tid {} }
if {0 == [llength $tid]} { ad_returnredirect $return_url }
# ---------------------------------------------------------------
# Perform the action
# ---------------------------------------------------------------
foreach ticket_id $tid {
# Write Audit Trail
im_audit -object_id $ticket_id -action before_update
db_transaction {
# Close the ticket
db_dml close_ticket "
update im_tickets set
ticket_signoff_date = now(),
ticket_status_id = [im_ticket_status_resolved]
where ticket_id = :ticket_id and
ticket_signoff_date is null -- do not overwrite
"
}
# Write Audit Trail
im_audit -object_id $ticket_id -action after_update
}
ad_returnredirect $return_url
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment