Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-gantt-editor
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-gantt-editor
Commits
4246e6ec
Commit
4246e6ec
authored
Sep 14, 2020
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Now ignoring closed projects (main project or leaf)
parent
3330e308
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
intranet-gantt-editor-create.sql
sql/postgresql/intranet-gantt-editor-create.sql
+14
-1
No files found.
sql/postgresql/intranet-gantt-editor-create.sql
View file @
4246e6ec
...
...
@@ -110,6 +110,7 @@ SELECT im_report_new (
update
im_reports
set
report_description
=
'Lists absences and assignments to other projects of the members of a project'
,
report_sql
=
'
-- Individual absences from im_user_absences (by user)
select t.*,
im_name_from_user_id(user_id) as user_name,
acs_object__name(context_id) as context
...
...
@@ -137,6 +138,7 @@ update im_reports set
a.end_date >= (select start_date from im_projects where project_id = %main_project_id%) and
a.start_date <= (select end_date from im_projects where project_id = %main_project_id%)
UNION
-- Group absences such as bank holidays
select
a.absence_id as object_id,
''
im_user_absence
''
as object_type,
...
...
@@ -162,6 +164,7 @@ update im_reports set
a.end_date >= (select start_date from im_projects where project_id = %main_project_id%) and
a.start_date <= (select end_date from im_projects where project_id = %main_project_id%)
UNION
-- Assignments to other projects
select p.project_id as object_id,
''
im_project
''
as object_type,
pe.person_id as user_id,
...
...
@@ -174,12 +177,21 @@ update im_reports set
) as context_id
from persons pe,
im_projects p,
im_projects super_p,
acs_rels r,
im_biz_object_members bom
where r.rel_id = bom.rel_id and
where
super_p.parent_id is null and
p.parent_id is not null and -- Ignore assignments on a main project level
p.tree_sortkey between super_p.tree_sortkey and tree_right(super_p.tree_sortkey) and
super_p.project_status_id in (select * from im_sub_categories(76)) and
p.project_status_id in (select * from im_sub_categories(76)) and
r.rel_id = bom.rel_id and
r.object_id_one = p.project_id and
r.object_id_two = pe.person_id and
pe.person_id in (
-- Only report about persons assigned in main_p
select distinct
object_id_two
from acs_rels,
...
...
@@ -189,6 +201,7 @@ update im_reports set
sub_p.tree_sortkey between main_p.tree_sortkey and tree_right(main_p.tree_sortkey) and
main_p.project_id = %main_project_id%
) and p.project_id not in (
-- Exclude assignments within main_p (handled in JavaScript)
select sub_p.project_id
from im_projects sub_p,
im_projects main_p
...
...
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