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
9c756054
Commit
9c756054
authored
Apr 17, 2019
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added new "accepted" status action
parent
9a0dc5d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
0 deletions
+65
-0
action-accepted.tcl
www/action-accepted.tcl
+65
-0
No files found.
www/action-accepted.tcl
0 → 100644
View file @
9c756054
# /packages/intranet-helpdesk/www/action-accepted.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
"accepted"
@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
{
# Accept the ticket
db_dml accept_ticket
"
update im_tickets set
ticket_status_id =
[
im_ticket_status_accepted
]
where ticket_id = :ticket_id
"
db_dml accept_ticket
"
update im_tickets set
ticket_reaction_date = now()
where ticket_id = :ticket_id and
ticket_reaction_date is null
"
}
# Write Audit Trail
im_audit -object_id
$ticket
_id -action after_update
}
ad_returnredirect
$return
_url
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