Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-timesheet2-tasks
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-timesheet2-tasks
Commits
06604efc
Commit
06604efc
authored
Feb 19, 2007
by
Christof Damian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
task delete wizard: assign tasks related stuff (resources, dependencies, ...)
to another task when deleting
parent
f959ef7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
task-action.tcl
www/task-action.tcl
+0
-1
task-delete.tcl
www/task-delete.tcl
+21
-1
No files found.
www/task-action.tcl
View file @
06604efc
...
...
@@ -126,7 +126,6 @@ switch $action {
if
{[
catch
{
foreach del_task_id
$delete
_task_list
{
db_dml del_task_deps
"delete from im_timesheet_task_dependencies where (task_id_one=:del_task_id or task_id_two=:del_task_id)"
im_exec_dml del_task
"im_timesheet_task__delete(:del_task_id)"
}
...
...
www/task-delete.tcl
View file @
06604efc
...
...
@@ -2,12 +2,32 @@ ad_page_contract {
}
{
{
task_id:optional,multiple
""
}
{
assign_to:optional,array
""
}
project_id
return_url
}
#
# Using "/intranet-timesheet2-tasks/task-action"
# move task related things before it gets deleted
#
foreach
old_id
$task
_id
{
if
{[
info
exists assign_to
(
$old
_id
)]}
{
set new_id
$assign
_to
(
$old
_id
)
db_dml move_hours
"UPDATE im_hours SET project_id=:new_id WHERE project_id=:old_id"
db_dml move_dependencies_one
"UPDATE im_timesheet_task_dependencies SET task_id_one=:new_id WHERE task_id_one=:old_id"
db_dml move_dependencies_two
"UPDATE im_timesheet_task_dependencies SET task_id_two=:new_id WHERE task_id_two=:old_id"
db_dml move_children
"UPDATE im_projects SET parent_id=:new_id WHERE parent_id=:old_id"
db_dml move_resources
"UPDATE acs_rels SET object_id_one=:new_id WHERE object_id_one=:old_id"
}
}
#
# Using "/intranet-timesheet2-tasks/task-action" to the deletion
#
# /task-action expects the task_id as an array
...
...
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