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
832189f6
Commit
832189f6
authored
Nov 29, 2005
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added a check in timesheet2-tasks to check for im_hours entries
before trying to delete a timesheet task
parent
852972ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
task-action.tcl
www/task-action.tcl
+17
-3
No files found.
www/task-action.tcl
View file @
832189f6
...
...
@@ -99,6 +99,7 @@ switch $action {
delete
{
set delete_task_list
[
array
names task_id
]
set task_names
[
join
$delete
_task_list
"<li>"
]
if
{
0 ==
[
llength
$delete
_task_list
]}
{
ad_returnredirect
$return
_url
}
...
...
@@ -106,14 +107,27 @@ switch $action {
# Convert the list of selected tasks into a
#
"task_id in (1,2,3,4...)"
clause
#
set t
ask_in_clause
"and task_id in
(
[
join
$delete
_task_list
", "
]
)
\n
"
ns_log Notice
"task-action: delete: t
ask_in_clause=
$task
_in_clause
"
set t
imesheet_task_list
"
(
[
join
$delete
_task_list
", "
]
)
\n
"
ns_log Notice
"task-action: delete: t
imesheet_task_list=
$timesheet
_task_list
"
# Check if timesheet entries exist
# We don't want to delete them...
set timesheet_sql
"
select count(*)
from im_hours
where timesheet_task_id in
$timesheet
_task_list"
set timesheet_hours_exist_p
[
db_string timesheet_hours_exist
$timesheet
_sql
]
if
{
$timesheet
_hours_exist_p
}
{
ad_return_complaint 1
"<li><B>
[
_ intranet-timesheet2-tasks.Unable_to_delete_tasks
]
</B>:<br>
[
_ intranet-timesheet2-tasks.Dependent_Objects_Exist
]
"
return
}
if
{[
catch
{
set sql
"
delete from im_timesheet_tasks
where 1=1
$task
_in_clause
"
task_id in
$timesheet
_task_list
"
db_dml delete_tasks
$sql
}
errmsg
]}
{
...
...
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