Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-timesheet2
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
1
Merge Requests
1
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
Commits
17a9de77
Commit
17a9de77
authored
Mar 09, 2007
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added an update to im_projects when calculating the timesheet sum
for normalization
parent
0a6407b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
17 deletions
+26
-17
intranet-timesheet2-procs.tcl
tcl/intranet-timesheet2-procs.tcl
+26
-17
No files found.
tcl/intranet-timesheet2-procs.tcl
View file @
17a9de77
...
@@ -86,6 +86,7 @@ ad_proc -public im_timesheet2_sync_timesheet_costs {
...
@@ -86,6 +86,7 @@ ad_proc -public im_timesheet2_sync_timesheet_costs {
h.cost_id is null
h.cost_id is null
$user
_sql
$user
_sql
$project
_sql
$project
_sql
LIMIT 100
"
"
set cost_ids
[
list
]
set cost_ids
[
list
]
...
@@ -473,27 +474,35 @@ ad_proc hours_sum { project_id {number_days ""} } {
...
@@ -473,27 +474,35 @@ ad_proc hours_sum { project_id {number_days ""} } {
}
}
set num
[
db_string hours_sum_for_group
"
set num
[
db_string hours_sum_for_group
"
select
select sum(hours)
sum(hours)
from im_hours
from
where
im_hours
project_id in (
where
select children.project_id
project_id in (
from im_projects parent,
select children.project_id
im_projects children
from im_projects parent,
where
im_projects children
children.tree_sortkey between
where
parent.tree_sortkey
children.tree_sortkey between
and tree_right(parent.tree_sortkey)
parent.tree_sortkey
and parent.project_id = :project_id
and tree_right(parent.tree_sortkey)
UNION
and parent.project_id = :project_id
select :project_id as project_id
UNION
)
select :project_id as project_id
)
$days
_back_sql
$days
_back_sql
"
]
"
]
if
{
""
==
$num
}
{
set num 0
}
if
{
""
==
$num
}
{
set num 0
}
# Update im_project reported_hours_cache
if
{[
empty_string_p
$number
_days
]}
{
db_dml update_project_reported_hours
"
update im_projects
set reported_hours_cache = :num
where project_id = :project_id
"
}
return
$num
return
$num
}
}
...
...
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