Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-rest
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-rest
Commits
641e77a9
Commit
641e77a9
authored
Jun 12, 2015
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- data-source for task tree:
now includes % assignment information per task
parent
bf0c55b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
project-task-tree.json.tcl
www/data-source/project-task-tree.json.tcl
+36
-2
No files found.
www/data-source/project-task-tree.json.tcl
View file @
641e77a9
...
...
@@ -21,6 +21,8 @@ if {!$read} {
ad_script_abort
}
# --------------------------------------------
# Task dependencies: Collect before the main loop
# predecessor_hash: The list of predecessors for each task
# successor_task_hash: The list of successors for each task
...
...
@@ -45,6 +47,35 @@ db_foreach task_dependencies $task_dependencies_sql {
set successor_hash
(
$task
_id_two
)
$successor
_tasks
}
# --------------------------------------------
# Assignees: Collect before the main loop
#
set
assignee_sql
"
select r.*,
bom.*,
to_char(coalesce(bom.percentage,0), '990.0') as percent_pretty,
im_name_from_user_id(r.object_id_two) as user_name,
im_email_from_user_id(r.object_id_two) as user_email,
im_initials_from_user_id(r.object_id_two) as user_initials
from im_projects main_p,
im_projects p,
acs_rels r,
im_biz_object_members bom
where r.rel_id = bom.rel_id and
r.object_id_one = p.project_id and
main_p.project_id = :project_id and
p.tree_sortkey between main_p.tree_sortkey and tree_right(main_p.tree_sortkey)
"
db_foreach assignee
$assignee
_sql
{
set assignees
[
list
]
if
{[
info
exists assignee_hash
(
$object
_id_one
)]}
{
set assignees
$assignee
_hash
(
$object
_id_one
)
}
lappend assignees
"{id:
$object
_id_two, percent:
$percent
_pretty, name:'
$user
_name', email:'
$user
_email', initials:'
$user
_initials'}"
set assignee_hash
(
$object
_id_one
)
$assignees
}
# ad_return_complaint 1 [join [array get assignee_hash
]
"<br>"
]
# --------------------------------------------
# Get all the variables valid for timesheet task
set
valid_vars
[
util_memoize
[
list
im_rest_object_type_columns -deref_p 0 -rest_otype
"im_timesheet_task"
]]
set
valid_vars
[
lsort
-unique
$valid
_vars
]
...
...
@@ -144,15 +175,18 @@ template::multirow foreach task_multirow {
set successor_tasks
[
list
]
set predecessor_tasks
[
list
]
set assignees
[
list
]
if
{[
info
exists successor_hash
(
$project
_id
)]}
{
set successor_tasks
$successor
_hash
(
$project
_id
)
}
if
{[
info
exists predecessor_hash
(
$project
_id
)]}
{
set predecessor_tasks
$predecessor
_hash
(
$project
_id
)
}
if
{[
info
exists assignee_hash
(
$project
_id
)]}
{
set assignees
$assignee
_hash
(
$project
_id
)
}
append task_json
"
${indent}
\{
${indent}
\t
id:
$project
_id,
${indent}
\t
text:'
$project
_name',
${indent}
\t
duration:13.5,
${indent}
\t
successors:
\[
[
join
$successor
_tasks
","
]
\]
,
${indent}
\t
predecessors:
\[
[
join
$predecessor
_tasks
","
]
\]
,
${indent}
\t
successors:
\[
[
join
$successor
_tasks
", "
]
\]
,
${indent}
\t
predecessors:
\[
[
join
$predecessor
_tasks
", "
]
\]
,
${indent}
\t
assignees:
\[
[
join
$assignees
", "
]
\]
,
${indent}
\t
user:'
$assignee
',
${indent}
\t
iconCls:'task-folder',
${indent}
\t
expanded:
$expanded
,
...
...
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