Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
senchatouch-timesheet
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
senchatouch-timesheet
Commits
0be50a23
Commit
0be50a23
authored
May 18, 2016
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Included upgrade script
parent
1c8a74bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
senchatouch-timesheet-create.sql
sql/postgresql/senchatouch-timesheet-create.sql
+47
-0
No files found.
sql/postgresql/senchatouch-timesheet-create.sql
View file @
0be50a23
...
...
@@ -104,6 +104,53 @@ SELECT acs_permission__grant_permission(
);
update
im_reports
set
report_sql
=
'
select child.project_id as id,
child.project_id,
child.parent_id,
tree_level(child.tree_sortkey)-1 as level,
child.tree_sortkey,
child.project_name,
child.project_nr,
child.company_id,
acs_object__name(child.company_id) as company_name,
child.project_type_id,
child.project_status_id,
im_category_from_id(child.project_type_id) as project_type,
im_category_from_id(child.project_status_id) as project_status,
child.project_lead_id,
im_name_from_user_id(child.project_lead_id) as project_lead_name,
( select sum(h.hours)
from im_hours h
where h.project_id = child.project_id
) as hours_total,
( select sum(h.hours)
from im_hours h
where h.user_id = %user_id% and
h.project_id = child.project_id
) as hours_for_user,
( select sum(h.hours)
from im_hours h
where h.user_id = %user_id% and
h.project_id = child.project_id and
h.day::date =
''
%date%
''
::date
) as hours_for_user_date
from
im_projects parent,
im_projects child
where
child.tree_sortkey between parent.tree_sortkey and tree_right(parent.tree_sortkey) and
parent.project_id = %main_project_id% and
parent.project_status_id in (select * from im_sub_categories(76) union select * from im_sub_categories(71)) and
child.project_status_id not in (select * from im_sub_categories(81))
order by
child.tree_sortkey
'
where
report_code
=
'rest_main_project_tasks_with_hours'
;
...
...
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