Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-ganttproject
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-ganttproject
Commits
3f1c28ab
Commit
3f1c28ab
authored
Nov 25, 2015
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Gustaf changes
parent
60d2f9ac
Changes
25
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
201 additions
and
201 deletions
+201
-201
ms-project-warning-component.tcl
lib/ms-project-warning-component.tcl
+20
-20
intranet-ganttproject-procs.tcl
tcl/intranet-ganttproject-procs.tcl
+93
-93
intranet-ms-calendar-procs.tcl
tcl/intranet-ms-calendar-procs.tcl
+2
-2
intranet-ms-project-procs.tcl
tcl/intranet-ms-project-procs.tcl
+7
-7
intranet-taskjuggler-procs.tcl
tcl/intranet-taskjuggler-procs.tcl
+1
-1
fix-tasks-with-overallocation.tcl
www/fix-tasks-with-overallocation.tcl
+4
-4
gantt-project.gan.tcl
www/gantt-project.gan.tcl
+1
-1
gantt-resources-cube.adp
www/gantt-resources-cube.adp
+5
-5
gantt-resources-cube.tcl
www/gantt-resources-cube.tcl
+1
-1
gantt-upload-2.adp
www/gantt-upload-2.adp
+3
-3
gantt-upload-2.tcl
www/gantt-upload-2.tcl
+3
-3
gantt-upload.adp
www/gantt-upload.adp
+4
-4
gantt-upload.tcl
www/gantt-upload.tcl
+1
-1
gantt-view-cube.adp
www/gantt-view-cube.adp
+4
-4
gantt-view-cube.tcl
www/gantt-view-cube.tcl
+1
-1
index.adp
www/index.adp
+7
-7
microsoft-project.xml.stable.tcl
www/microsoft-project.xml.stable.tcl
+9
-9
microsoft-project.xml.tcl
www/microsoft-project.xml.tcl
+9
-9
microsoft-project.xml.timephased-unstable.tcl
www/microsoft-project.xml.timephased-unstable.tcl
+11
-11
openproj-project.xml.tcl
www/openproj-project.xml.tcl
+2
-2
taskjuggler-import.adp
www/taskjuggler-import.adp
+3
-3
taskjuggler-import.tcl
www/taskjuggler-import.tcl
+1
-1
taskjuggler.adp
www/taskjuggler.adp
+4
-4
taskjuggler.tcl
www/taskjuggler.tcl
+2
-2
single-task.tcl
www/test/single-task.tcl
+3
-3
No files found.
lib/ms-project-warning-component.tcl
View file @
3f1c28ab
...
...
@@ -80,7 +80,7 @@ if {![info exists ignore_hash($warning_key)]} {
set task_list_len
[
llength
$task
_list
]
if
{
$task
_list_len > 3
}
{
set task_list
[
lrange
$task
_list 0 2
]
lappend task_list
"... (
[
expr
$task
_list_len - 3
]
[
lang::message::lookup
""
intranet-ganttproject.more_tasks
"more tasks"
]
)"
lappend task_list
"... (
[
expr
{
$task
_list_len - 3
}
]
[
lang::message::lookup
""
intranet-ganttproject.more_tasks
"more tasks"
]
)"
}
set project_id
$main
_project_id
...
...
@@ -164,7 +164,7 @@ if {![info exists ignore_hash($warning_key)]} {
append task_html
"</tr>
\n
"
}
if
{
[
string
length
$task
_html
]
> 0
}
{
if
{
$task
_html ne
""
}
{
set task_header
"<tr class=rowtitle>
\n
"
append task_header
"<td class=rowtitle><input type=checkbox name=_dummy onclick=acs_ListCheckAll('task_with_empty_start_end_date',this.checked) checked></td>
\n
"
append task_header
"<td class=rowtitle>
[
lang::message::lookup
""
intranet-ganttproject.Task
"Task"
]
</td>
\n
"
...
...
@@ -372,11 +372,11 @@ if {![info exists ignore_hash($warning_key)]} {
set task_list_len
[
llength
$task
_list
]
if
{
$task
_list_len > 3
}
{
set task_list
[
lrange
$task
_list 0 2
]
lappend task_list
"... (
[
expr
$task
_list_len - 3
]
more tasks)"
lappend task_list
"... (
[
expr
{
$task
_list_len - 3
}
]
more tasks)"
}
if
{
[
string
length
$task
_html
]
> 0
}
{
if
{
$task
_html ne
""
}
{
set task_header
"<tr class=rowtitle>
\n
"
append task_header
"<td class=rowtitle><input type=checkbox name=_dummy onclick=acs_ListCheckAll('task_without_start_constraint',this.checked) checked></td>
\n
"
append task_header
"<td class=rowtitle>
[
lang::message::lookup
""
intranet-ganttproject.Task
"Task"
]
</td>
\n
"
...
...
@@ -490,10 +490,10 @@ if {0 && ![info exists ignore_hash($warning_key)]} {
if
{
""
==
$project
_calendar
}
{
set project_calendar
[
im_ms_calendar::default
]
}
set seconds_in_interval
[
im_ms_calendar::seconds_in_interval -start_date
$start
_date -end_date
$end
_date -calendar
$project
_calendar
]
set seconds_work
[
expr
$seconds
_in_interval *
$percentage
/ 100.0
]
set seconds_work
[
expr
{
$seconds
_in_interval *
$percentage
/ 100.0
}
]
switch
$uom
_id
{
320
{
set seconds_uom
[
expr
$planned
_units * 3600
]
}
321
{
set seconds_uom
[
expr
$planned
_units * 3600 * 8.0
]
}
320
{
set seconds_uom
[
expr
{
$planned
_units * 3600
}
]
}
321
{
set seconds_uom
[
expr
{
$planned
_units * 3600 * 8.0
}
]
}
default
{
set seconds_uom 0.0
}
}
...
...
@@ -503,12 +503,12 @@ if {0 && ![info exists ignore_hash($warning_key)]} {
if
{
""
!=
$seconds
_in_timephased
}
{
set seconds_work
$seconds
_in_timephased
}
set overallocation_factor
"undefined"
catch
{
set overallocation_factor
[
expr
$seconds
_work /
$seconds
_uom
]
}
catch
{
set overallocation_factor
[
expr
{
$seconds
_work /
$seconds
_uom
}
]
}
if
{
"undefined"
!=
$overallocation
_factor
}
{
# Accept max. 10% overassignment, because of small rounding
# errors between %assigned and actual time spent by the resource
if
{[
expr
abs
(
$overallocation
_factor - 1.0
)
]
> 0.10
}
{
if
{[
expr
{
abs
(
$overallocation
_factor - 1.0
)}
]
> 0.10
}
{
ns_log Notice
"ms-project-warning-component: fix-tasks-with-overallocation: seconds_work=
$seconds
_work, seconds_uom=
$seconds
_uom, seconds_in_timephased=
$seconds
_in_timephased, task_name=
$task
_name"
...
...
@@ -519,10 +519,10 @@ if {0 && ![info exists ignore_hash($warning_key)]} {
append task_html
"<td align=left><a href=
[
export_vars -base
"/intranet/projects/view"
{{
project_id
$task
_id
}}]
>
$task
_name</a></td>
\n
"
append task_html
"<td>
$start
_date_pretty</td>
\n
"
append task_html
"<td>
$end
_date_pretty</td>
\n
"
append task_html
"<td align=right>
[
expr
round
(
10.0 *
$seconds
_uom / 3600.0
)
/ 10.0
]
</td>
\n
"
append task_html
"<td align=right>
[
expr
round
(
10.0 *
$seconds
_work / 3600.0
)
/ 10.0
]
</td>
\n
"
append task_html
"<td align=right>
[
expr
round
(
10.0 *
$percentage
)
/ 10.0
]
</a></td>
\n
"
append task_html
"<td align=right>
[
expr
round
(
1000.0 *
$overallocation
_factor
)
/ 1000.0
]
</td>
\n
"
append task_html
"<td align=right>
[
expr
{
round
(
10.0 *
$seconds
_uom / 3600.0
)
/ 10.0
}
]
</td>
\n
"
append task_html
"<td align=right>
[
expr
{
round
(
10.0 *
$seconds
_work / 3600.0
)
/ 10.0
}
]
</td>
\n
"
append task_html
"<td align=right>
[
expr
{
round
(
10.0 *
$percentage
)
/ 10.0
}
]
</a></td>
\n
"
append task_html
"<td align=right>
[
expr
{
round
(
1000.0 *
$overallocation
_factor
)
/ 1000.0
}
]
</td>
\n
"
append task_html
"</tr>
\n
"
incr task_ctr
}
...
...
@@ -539,11 +539,11 @@ if {0 && ![info exists ignore_hash($warning_key)]} {
set task_list_len
[
llength
$task
_list
]
if
{
$task
_list_len > 3
}
{
set task_list
[
lrange
$task
_list 0 2
]
lappend task_list
"... (
[
expr
$task
_list_len - 3
]
more tasks)"
lappend task_list
"... (
[
expr
{
$task
_list_len - 3
}
]
more tasks)"
}
if
{
[
string
length
$task
_html
]
> 0
}
{
if
{
$task
_html ne
""
}
{
set task_header
"<tr class=rowtitle>
\n
"
append task_header
"<td class=rowtitle align=center><input type=checkbox name=_dummy onclick=acs_ListCheckAll('task_with_overallocation',this.checked) checked></td>
\n
"
append task_header
"<td class=rowtitle align=center>
[
lang::message::lookup
""
intranet-ganttproject.Task
"Task"
]
</td>
\n
"
...
...
@@ -692,7 +692,7 @@ if {![info exists ignore_hash($warning_key)]} {
foreach tuple
$assigned
_skill_profiles
{
set skill_profile_id
[
lindex
$tuple
0
]
set percent
[
lindex
$tuple
2
]
if
{
""
!=
$percent
}
{
set percent
[
expr
$percent
+0.0
]
}
if
{
""
!=
$percent
}
{
set percent
[
expr
{
$percent
+0.0
}
]
}
set string
[
im_name_from_user_id
$skill
_profile_id
]
if
{
""
!=
$percent
}
{
append string
":
$percent
%"
}
lappend skill_profiles_list
$string
...
...
@@ -703,7 +703,7 @@ if {![info exists ignore_hash($warning_key)]} {
foreach tuple
$assigned
_persons
{
set skill_profile_id
[
lindex
$tuple
0
]
set percent
[
lindex
$tuple
2
]
set percent
[
expr
$percent
+0.0
]
set percent
[
expr
{
$percent
+0.0
}
]
set string
[
im_name_from_user_id
$skill
_profile_id
]
if
{
""
!=
$percent
}
{
append string
":
$percent
%"
}
lappend persons_list
$string
...
...
@@ -715,7 +715,7 @@ if {![info exists ignore_hash($warning_key)]} {
set rel_id
[
lindex
$tuple
3
]
# Required percent assignment in order to eqal out person vs. skill profiles
set percent
[
expr
$percentage
_skill_profiles -
$percentage
_non_skill_profiles
]
set percent
[
expr
{
$percentage
_skill_profiles -
$percentage
_non_skill_profiles
}
]
append task_html
"<tr>
\n
"
append task_html
"<td><input type=checkbox name=checked.
$rel
_id id=task_with_overallocation.
$rel
_id checked></td>
\n
"
...
...
@@ -743,11 +743,11 @@ if {![info exists ignore_hash($warning_key)]} {
set task_list_len
[
llength
$task
_list
]
if
{
$task
_list_len > 3
}
{
set task_list
[
lrange
$task
_list 0 2
]
lappend task_list
"... (
[
expr
$task
_list_len - 3
]
more tasks)"
lappend task_list
"... (
[
expr
{
$task
_list_len - 3
}
]
more tasks)"
}
if
{
[
string
length
$task
_html
]
> 0
}
{
if
{
$task
_html ne
""
}
{
set task_header
"<tr class=rowtitle>
\n
"
append task_header
"<td class=rowtitle align=center><input type=checkbox name=_dummy onclick=acs_ListCheckAll('task_with_overallocation',this.checked) checked></td>
\n
"
append task_header
"<td class=rowtitle align=center>
[
lang::message::lookup
""
intranet-ganttproject.Task
"Task Name"
]
</td>
\n
"
...
...
tcl/intranet-ganttproject-procs.tcl
View file @
3f1c28ab
This diff is collapsed.
Click to expand it.
tcl/intranet-ms-calendar-procs.tcl
View file @
3f1c28ab
...
...
@@ -226,7 +226,7 @@ ad_proc -public seconds_in_interval {
# ----------------------------------------------------------------------------------------
# Get the service hours per Day Of Week
(
1=Su, 2=Mo, 7=Sa
)
# service_hours are like
{
09:00 18:00
}
set dow
[
expr
1 +
((
$j
+ 1
)
% 7
)
]
set dow
[
expr
{
1 +
((
$j
+ 1
)
% 7
)}
]
set cal_day_string
$cal
_hash
(
$dow
)
array unset cal_day_hash
array set cal_day_hash
$cal
_day_string
...
...
@@ -248,7 +248,7 @@ ad_proc -public seconds_in_interval {
# Add the duration of the interval to the working seconds
if
{
$hour
_end_epoch >
$hour
_start_epoch
}
{
set working_seconds
[
expr
$working
_seconds +
(
$hour
_end_epoch -
$hour
_start_epoch
)
]
set working_seconds
[
expr
{
$working
_seconds +
(
$hour
_end_epoch -
$hour
_start_epoch
)}
]
}
ns_log Notice
"im_ms_calendar::seconds_in_interval: j=
$j
, dow=
$dow
, hour_start_ansi=
$hour
_start_ansi, hour_end_ansi=
$hour
_end_ansi, hour_start_epoch=
$hour
_start_epoch, hour_end_epoch=
$hour
_end_epoch"
...
...
tcl/intranet-ms-project-procs.tcl
View file @
3f1c28ab
...
...
@@ -192,7 +192,7 @@ ad_proc -public im_ms_project_write_task {
if
{
""
==
$duration
_hours
}
{
set duration_hours
$default
_duration
}
if
{
""
==
$duration
_hours ||
[
string
equal
$start
_date
$end
_date
]
||
$duration
_hours < 0
}
{
if
{
""
==
$duration
_hours ||
$start
_date eq
$end
_date
||
$duration
_hours < 0
}
{
set duration_hours 0
}
...
...
@@ -282,21 +282,21 @@ ad_proc -public im_ms_project_write_task {
Duration - ManualDuration
{
# Check if we've got a duration defined in the xml_elements.
# Otherwise
(
export without import...
)
generate a duration.
set seconds
[
expr
$duration
_hours * 3600.0
]
set seconds
[
expr
{
$duration
_hours * 3600.0
}
]
set value
[
im_gp_seconds_to_ms_project_time
$seconds
]
}
ManualDuration
{
# Check if we've got a duration defined in the xml_elements.
# Otherwise
(
export without import...
)
generate a duration.
set seconds
[
expr
$duration
_hours * 3600.0
]
set seconds
[
expr
{
$duration
_hours * 3600.0
}
]
set value
[
im_gp_seconds_to_ms_project_time
$seconds
]
}
DurationFormat
{
set value 7
}
EffortDriven
{
if
{
"t"
==
$effort
_driven_p
}
{
set value 1
}
else
{
set value 0
}
}
RemainingDuration
{
set remaining_duration_hours
[
expr
round
(
$duration
_hours *
(
100.0 -
$percent
_completed
)
/ 100.0
)
]
set seconds
[
expr
$remaining
_duration_hours * 3600.0
]
set remaining_duration_hours
[
expr
{
round
(
$duration
_hours *
(
100.0 -
$percent
_completed
)
/ 100.0
)}
]
set seconds
[
expr
{
$remaining
_duration_hours * 3600.0
}
]
set value
[
im_gp_seconds_to_ms_project_time
$seconds
]
}
Milestone
{
if
{
"t"
==
$milestone
_p
}
{
set value 1
}
else
{
set value 0
}
}
...
...
@@ -358,7 +358,7 @@ ad_proc -public im_ms_project_write_task {
set planned_units 0
set value
""
}
else
{
set seconds
[
expr
$planned
_units * 3600.0
]
set seconds
[
expr
{
$planned
_units * 3600.0
}
]
set value
[
im_gp_seconds_to_ms_project_time
$seconds
]
}
}
...
...
@@ -493,7 +493,7 @@ ad_proc -public im_ms_project_seconds_in_timephased {
set value_seconds
[
im_gp_ms_project_time_to_seconds
$timephase
_value
]
if
{[
string
is integer
$value
_seconds
]}
{
if
{
""
==
$seconds
}
{
set seconds 0.0
}
set seconds
[
expr
$seconds
+
$value
_seconds
]
set seconds
[
expr
{
$seconds
+
$value
_seconds
}
]
}
}
}
...
...
tcl/intranet-taskjuggler-procs.tcl
View file @
3f1c28ab
...
...
@@ -196,7 +196,7 @@ ad_proc -public im_taskjuggler_write_task {
set allocation_ctr 0
db_foreach project_allocations
$project
_allocations_sql
{
incr allocation_ctr
set allocation_hours
[
expr
$percentage
* 8.0 / 100.0
]
set allocation_hours
[
expr
{
$percentage
* 8.0 / 100.0
}
]
if
{
$allocation
_hours < 0.1
}
{
# Ignore allocations below 1%.
append tj
"
${indent}
\t\#
WARNING: Ignoring assignment percentage of
$percentage
because it is below the TJ resolution
\n
"
...
...
www/fix-tasks-with-overallocation.tcl
View file @
3f1c28ab
...
...
@@ -84,15 +84,15 @@ switch $action {
# Calculate the overallocation factor in order to reduce the resource assignments
set seconds_in_interval
[
im_ms_calendar::seconds_in_interval -start_date
$start
_date -end_date
$end
_date -calendar
[
im_ms_calendar::default
]]
set seconds_work
[
expr
$seconds
_in_interval *
$percentage
/ 100.0
]
set seconds_work
[
expr
{
$seconds
_in_interval *
$percentage
/ 100.0
}
]
switch
$uom
_id
{
320
{
set seconds_uom
[
expr
$planned
_units * 3600
]
}
321
{
set seconds_uom
[
expr
$planned
_units * 3600 * 8.0
]
}
320
{
set seconds_uom
[
expr
{
$planned
_units * 3600
}
]
}
321
{
set seconds_uom
[
expr
{
$planned
_units * 3600 * 8.0
}
]
}
default
{
set seconds_uom 0.0
}
}
set overallocation_factor
"undefined"
catch
{
set overallocation_factor
[
expr
round
(
10.0 *
$seconds
_work /
$seconds
_uom
)
/ 10.0
]
}
catch
{
set overallocation_factor
[
expr
{
round
(
10.0 *
$seconds
_work /
$seconds
_uom
)
/ 10.0
}
]
}
if
{
"undefined"
!=
$overallocation
_factor
}
{
db_dml reduce_overallocation
"
...
...
www/gantt-project.gan.tcl
View file @
3f1c28ab
...
...
@@ -26,7 +26,7 @@ ad_page_contract {
set
today
[
db_string today
"select to_char(now(), 'YYYY-MM-DD')"
]
if
{
0 ==
$user
_id
}
{
set user_id
[
a
d_maybe_redirect_for_registratio
n
]
set user_id
[
a
uth::require_logi
n
]
}
# get the current users permissions for this project
...
...
www/gantt-resources-cube.adp
View file @
3f1c28ab
<master src="../../intranet-core/www/master">
<property name="
title">@page_title
@</property>
<property name="main_navbar_label">@main_navbar_label@</property>
<property name="sub_navbar">@sub_navbar;
noquote
@</property>
<property name="left_navbar">@left_navbar_html;
noquote
@</property>
<property name="show_context_help">@show_context_help_p;
noquote
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="main_navbar_label">@main_navbar_label
;literal
@</property>
<property name="sub_navbar">@sub_navbar;
literal
@</property>
<property name="left_navbar">@left_navbar_html;
literal
@</property>
<property name="show_context_help">@show_context_help_p;
literal
@</property>
@html;noquote@
www/gantt-resources-cube.tcl
View file @
3f1c28ab
...
...
@@ -37,7 +37,7 @@ ad_page_contract {
set
show_context_help_p 0
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
if
{
!
[
im_permission
$user
_id
"view_projects_all"
]}
{
ad_return_complaint 1
"You don't have permissions to see this page"
ad_script_abort
...
...
www/gantt-upload-2.adp
View file @
3f1c28ab
<master>
<property name="
title">@page_title
@</property>
<property name="context">@context_bar@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">@context_bar
;literal
@</property>
<property name="main_navbar_label">projects</property>
<property name="sub_navbar">@sub_navbar;
noquote
@</property>
<property name="sub_navbar">@sub_navbar;
literal
@</property>
<h1>@page_title@</h1>
...
...
www/gantt-upload-2.tcl
View file @
3f1c28ab
...
...
@@ -27,7 +27,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
im_project_permissions
$user
_id
$project
_id view read write admin
if
{
!$write
}
{
ad_return_complaint 1
"You don't have permissions to see this page"
...
...
@@ -93,7 +93,7 @@ if {$max_n_bytes && ($file_size > $max_n_bytes) } {
# -------------------------------------------------------------------
set
file_type
[
fileutil::fileType
$tmp
_filename
]
if
{
[
lsearch
$file
_type
"ms-office"
]
>= 0
}
{
if
{
"ms-office"
in
$file
_type
}
{
# We've found a binary MS-Office file, probably MPP
ad_return_complaint 1
"
...
...
@@ -160,7 +160,7 @@ array set task_hash $task_hash_array
set
task_hash_tasks
[
list
0
]
foreach
task_hash_key
[
array
names task_hash
]
{
set task_hash_value
$task
_hash
(
$task
_hash_key
)
if
[
info
exists db_task_ids
(
$task
_hash_value
)]
{
if
{[
info
exists db_task_ids
(
$task
_hash_value
)]}
{
unset db_task_ids
(
$task
_hash_value
)
}
lappend task_hash_tasks
$task
_hash_value
...
...
www/gantt-upload.adp
View file @
3f1c28ab
...
...
@@ -2,10 +2,10 @@
<!-- @author Juanjo Ruiz (juanjoruizx@yahoo.es) -->
<master src="../../intranet-core/www/master">
<property name="
title">@page_title
@</property>
<property name="context">@context_bar@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">@context_bar
;literal
@</property>
<property name="main_navbar_label">projects</property>
<property name="sub_navbar">@sub_navbar;
noquote
@</property>
<property name="sub_navbar">@sub_navbar;
literal
@</property>
<!-- ------------------------------------------------------------------------------ -->
...
...
@@ -18,7 +18,7 @@
</p>
<form enctype="multipart/form-data" method="POST" action="gantt-upload-2">
<%= [export_vars -form {project_id return_url}] %>
<table border=
0
>
<table border=
"0"
>
<tr>
<td><%= [lang::message::lookup "" intranet-core.File "File"] %></td>
<td>
...
...
www/gantt-upload.tcl
View file @
3f1c28ab
...
...
@@ -34,7 +34,7 @@ set page_title [lang::message::lookup "" intranet-ganttproject.Import_from_progr
set
context_bar
[
im_context_bar
$page
_title
]
# get the current users permissions for this project
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
im_project_permissions
$user
_id
$project
_id view read write admin
if
{
!$write
}
{
ad_return_complaint 1
"You don't have permissions to see this page"
...
...
www/gantt-view-cube.adp
View file @
3f1c28ab
<master src="../../intranet-core/www/master">
<property name="
title">@page_title
@</property>
<property name="main_navbar_label">@main_navbar_label@</property>
<property name="sub_navbar">@sub_navbar;
noquote
@</property>
<property name="show_context_help">@show_context_help_p;
noquote
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="main_navbar_label">@main_navbar_label
;literal
@</property>
<property name="sub_navbar">@sub_navbar;
literal
@</property>
<property name="show_context_help">@show_context_help_p;
literal
@</property>
@html;noquote@
www/gantt-view-cube.tcl
View file @
3f1c28ab
...
...
@@ -33,7 +33,7 @@ ad_page_contract {
# Default & Security
# ---------------------------------------------------------------
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
foreach
pid
$project
_id
{
im_project_permissions
$user
_id
$pid
view read write admin
...
...
www/index.adp
View file @
3f1c28ab
...
...
@@ -3,8 +3,8 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<master src="../../intranet-core/www/master">
<property name="
title">@page_title
@</property>
<property name="context">@context_bar@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">@context_bar
;literal
@</property>
<property name="main_navbar_label">forum</property>
...
...
@@ -18,20 +18,20 @@
<form enctype=multipart/form-data method=POST action=gantt-upload-2.tcl>
<%= [export_vars -form {return_url}] %>
<table border=
0
>
<table border=
"0"
>
<tr>
<td class=rowtitle align=
center colspan=2
>Upload a GanttProject file</td>
<td class=rowtitle align=
"center" colspan="2"
>Upload a GanttProject file</td>
</tr>
<tr $bgcolor(1)>
<td align=
right
>File</td>
<td align=
"right"
>File</td>
<td>
<input type=
file name=upload_file size=30
>
<input type=
"file" name="upload_file" size="30"
>
</td>
</tr>
<tr $bgcolor(0)>
<td></td>
<td>
<input type=
submit
value='Submit'><br>
<input type=
"submit"
value='Submit'><br>
</td>
</tr>
</table>
...
...
www/microsoft-project.xml.stable.tcl
View file @
3f1c28ab
...
...
@@ -22,7 +22,7 @@ ad_page_contract {
# ---------------------------------------------------------------
set
today
[
db_string today
"select to_char(now(), 'YYYY-MM-DD')"
]
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
set
main_project_id
$project
_id
...
...
@@ -405,16 +405,16 @@ db_foreach project_allocations $project_allocations_sql {
# The sum of assigned work overrides the task work in MS-Project,
# so we divide the task work evenly across the assigned resources.
if
{
!
[
info
exists planned_units
]
||
""
==
$planned
_units ||
""
==
[
string
trim
$planned
_units
]
}
{
set planned_units 0
}
set planned_seconds
[
expr
$planned
_units * 3600.0
]
set actual_work_seconds
[
expr
$planned
_seconds *
$percent
_completed / 100.0
]
set remaining_work_seconds
[
expr
$planned
_seconds -
$actual
_work_seconds
]
set planned_seconds
[
expr
{
$planned
_units * 3600.0
}
]
set actual_work_seconds
[
expr
{
$planned
_seconds *
$percent
_completed / 100.0
}
]
set remaining_work_seconds
[
expr
{
$planned
_seconds -
$actual
_work_seconds
}
]
if
{
$total
_percentage_assigned == 0
}
{
set work_seconds
$planned
_seconds
}
else
{
set work_seconds
[
expr
$planned
_seconds *
$percentage
_assigned /
$total
_percentage_assigned
]
set actual_work_seconds
[
expr
$actual
_work_seconds *
$percentage
_assigned /
$total
_percentage_assigned
]
set remaining_work_seconds
[
expr
$remaining
_work_seconds *
$percentage
_assigned /
$total
_percentage_assigned
]
set work_seconds
[
expr
{
$planned
_seconds *
$percentage
_assigned /
$total
_percentage_assigned
}
]
set actual_work_seconds
[
expr
{
$actual
_work_seconds *
$percentage
_assigned /
$total
_percentage_assigned
}
]
set remaining_work_seconds
[
expr
{
$remaining
_work_seconds *
$percentage
_assigned /
$total
_percentage_assigned
}
]
}
set work_ms
[
im_gp_seconds_to_ms_project_time
$work
_seconds
]
set actual_work_ms
[
im_gp_seconds_to_ms_project_time
$actual
_work_seconds
]
...
...
@@ -427,7 +427,7 @@ db_foreach project_allocations $project_allocations_sql {
<UID>
$assignment
_ctr</UID>
<TaskUID>
$task
_id</TaskUID>
<ResourceUID>
$user
_id</ResourceUID>
<Units>
[
expr
$percentage
_assigned / 100.0
]
</Units>
<Units>
[
expr
{
$percentage
_assigned / 100.0
}
]
</Units>
<PercentWorkComplete>
$percent
_completed</PercentWorkComplete>
<Start>
${start_date_date}
T00:00:00</Start>
<Finish>
${end_date_date}
T23:00:00</Finish>
...
...
@@ -449,7 +449,7 @@ set xml ""
foreach
line
[
split
$xml
_org
"
\n
"
]
{
if
{[
regexp
{
^
([
\ \t
]
*
)
\<
([
a-zA-Z0-9
]
+
)
\>\<\/
([
a-zA-Z0-9
]
+
)
\>
}
$line
match blank tag1 tag2
]}
{
if
{
[
string
equal
$tag1
$tag2
]
}
{
if
{
$tag1
eq
$tag2
}
{
append xml
"
$blank
<
$tag1
/>
\n
"
}
else
{
append xml
"
$line
\n
"
...
...
www/microsoft-project.xml.tcl
View file @
3f1c28ab
...
...
@@ -22,7 +22,7 @@ ad_page_contract {
# ---------------------------------------------------------------
set
today
[
db_string today
"select to_char(now(), 'YYYY-MM-DD')"
]
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
set
main_project_id
$project
_id
...
...
@@ -405,16 +405,16 @@ db_foreach project_allocations $project_allocations_sql {
# The sum of assigned work overrides the task work in MS-Project,
# so we divide the task work evenly across the assigned resources.
if
{
!
[
info
exists planned_units
]
||
""
==
$planned
_units ||
""
==
[
string
trim
$planned
_units
]
}
{
set planned_units 0
}
set planned_seconds
[
expr
$planned
_units * 3600.0
]
set actual_work_seconds
[
expr
$planned
_seconds *
$percent
_completed / 100.0
]
set remaining_work_seconds
[
expr
$planned
_seconds -
$actual
_work_seconds
]
set planned_seconds
[
expr
{
$planned
_units * 3600.0
}
]
set actual_work_seconds
[
expr
{
$planned
_seconds *
$percent
_completed / 100.0
}
]
set remaining_work_seconds
[
expr
{
$planned
_seconds -
$actual
_work_seconds
}
]
if
{
$total
_percentage_assigned == 0
}
{
set work_seconds
$planned
_seconds
}
else
{
set work_seconds
[
expr
$planned
_seconds *
$percentage
_assigned /
$total
_percentage_assigned
]
set actual_work_seconds
[
expr
$actual
_work_seconds *
$percentage
_assigned /
$total
_percentage_assigned
]
set remaining_work_seconds
[
expr
$remaining
_work_seconds *
$percentage
_assigned /
$total
_percentage_assigned
]
set work_seconds
[
expr
{
$planned
_seconds *
$percentage
_assigned /
$total
_percentage_assigned
}
]
set actual_work_seconds
[
expr
{
$actual
_work_seconds *
$percentage
_assigned /
$total
_percentage_assigned
}
]
set remaining_work_seconds
[
expr
{
$remaining
_work_seconds *
$percentage
_assigned /
$total
_percentage_assigned
}
]
}
set work_ms
[
im_gp_seconds_to_ms_project_time
$work
_seconds
]
set actual_work_ms
[
im_gp_seconds_to_ms_project_time
$actual
_work_seconds
]
...
...
@@ -427,7 +427,7 @@ db_foreach project_allocations $project_allocations_sql {
<UID>
$assignment
_ctr</UID>
<TaskUID>
$task
_id</TaskUID>
<ResourceUID>
$user
_id</ResourceUID>
<Units>
[
expr
$percentage
_assigned / 100.0
]
</Units>
<Units>
[
expr
{
$percentage
_assigned / 100.0
}
]
</Units>
<PercentWorkComplete>
$percent
_completed</PercentWorkComplete>
<Start>
${start_date_date}
T00:00:00</Start>
<Finish>
${end_date_date}
T23:00:00</Finish>
...
...
@@ -449,7 +449,7 @@ set xml ""
foreach
line
[
split
$xml
_org
"
\n
"
]
{
if
{[
regexp
{
^
([
\ \t
]
*
)
\<
([
a-zA-Z0-9
]
+
)
\>\<\/
([
a-zA-Z0-9
]
+
)
\>
}
$line
match blank tag1 tag2
]}
{
if
{
[
string
equal
$tag1
$tag2
]
}
{
if
{
$tag1
eq
$tag2
}
{
append xml
"
$blank
<
$tag1
/>
\n
"
}
else
{
append xml
"
$line
\n
"
...
...
www/microsoft-project.xml.timephased-unstable.tcl
View file @
3f1c28ab
...
...
@@ -22,7 +22,7 @@ ad_page_contract {
# ---------------------------------------------------------------
set
today
[
db_string today
"select to_char(now(), 'YYYY-MM-DD')"
]
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
set
main_project_id
$project
_id
...
...
@@ -409,16 +409,16 @@ db_foreach project_allocations $project_allocations_sql {
# The sum of assigned work overrides the task work in MS-Project,
# so we divide the task work evenly across the assigned resources.
if
{
!
[
info
exists planned_units
]
||
""
==
$planned
_units ||
""
==
[
string
trim
$planned
_units
]
}
{
set planned_units 0
}
set planned_seconds
[
expr
$planned
_units * 3600.0
]
set actual_work_seconds
[
expr
$planned
_seconds *
$percent
_completed / 100.0
]
set remaining_work_seconds
[
expr
$planned
_seconds -
$actual
_work_seconds
]
set planned_seconds
[
expr
{
$planned
_units * 3600.0
}
]
set actual_work_seconds
[
expr
{
$planned
_seconds *
$percent
_completed / 100.0
}
]
set remaining_work_seconds
[
expr
{
$planned
_seconds -
$actual
_work_seconds
}
]
if
{
$total
_percentage_assigned == 0
}
{
set work_seconds
$planned
_seconds
}
else
{
set work_seconds
[
expr
$planned
_seconds *
$percentage
_assigned /
$total
_percentage_assigned
]
set actual_work_seconds
[
expr
$actual
_work_seconds *
$percentage
_assigned /
$total
_percentage_assigned
]
set remaining_work_seconds
[
expr
$remaining
_work_seconds *
$percentage
_assigned /
$total
_percentage_assigned
]
set work_seconds
[
expr
{
$planned
_seconds *
$percentage
_assigned /
$total
_percentage_assigned
}
]
set actual_work_seconds
[
expr
{
$actual
_work_seconds *
$percentage
_assigned /
$total
_percentage_assigned
}
]
set remaining_work_seconds
[
expr
{
$remaining
_work_seconds *
$percentage
_assigned /
$total
_percentage_assigned
}
]
}
set work_ms
[
im_gp_seconds_to_ms_project_time
$work
_seconds
]
set actual_work_ms
[
im_gp_seconds_to_ms_project_time
$actual
_work_seconds
]
...
...
@@ -431,7 +431,7 @@ db_foreach project_allocations $project_allocations_sql {
# in order to return exactly the same schedule for a task that was specified in MS-Project
#
(
exact
"round-trip"
)
set units
[
expr
$percentage
_assigned / 100.0
]
set units
[
expr
{
$percentage
_assigned / 100.0
}
]
set xml_exists_p
[
db_0or1row assignment_info
"
select ga.*
...
...
@@ -442,7 +442,7 @@ db_foreach project_allocations $project_allocations_sql {
if
{
$xml
_exists_p
}
{
set units_diff 100
if
{
$units
> 0
}
{
set units_diff
[
expr
100.0 * abs
((
$units
-
$xml
_units
)
/
$units
)
]
}
if
{
$units
> 0
}
{
set units_diff
[
expr
{
100.0 * abs
((
$units
-
$xml
_units
)
/
$units
)}
]
}
ns_log Notice
"microsoft-project: TimephasedData: rel_id=
$rel
_id,
$task
_id !=
$xml
_taskuid,
$user
_id !=
$xml
_resourceuid,
$units
!=
$xml
_units, units_diff=
$units
_diff"
if
{
$task
_id !=
$xml
_taskuid
}
{
set xml_exists_p 0
}
if
{
$user
_id !=
$xml
_resourceuid
}
{
set xml_exists_p 0
}
...
...
@@ -478,7 +478,7 @@ db_foreach project_allocations $project_allocations_sql {
ns_log Notice
"microsoft-project: TimephasedData: store: xml_element=
$xml
_element, len(xml_xml) =
[
string
length
$xml
_xml
]
"
set var_name
"xml_
[
string
tolower
$xml
_element
]
"
set var_value
[
expr
"
$
$var
_name"
]
set var_value
[
expr
$
$var
_name
]
append xml_xml
"<
$xml
_element>
$var
_value</
$xml
_element>
\n\t\t\t
"
}
set timephased_xml
""
...
...
@@ -529,7 +529,7 @@ set xml ""
foreach
line
[
split
$xml
_org
"
\n
"
]
{
if
{[
regexp
{
^
([
\ \t
]
*
)
\<
([
a-zA-Z0-9
]
+
)
\>\<\/
([
a-zA-Z0-9
]
+
)
\>
}
$line
match blank tag1 tag2
]}
{
if
{
[
string
equal
$tag1
$tag2
]
}
{
if
{
$tag1
eq
$tag2
}
{
append xml
"
$blank
<
$tag1
/>
\n
"
}
else
{
append xml
"
$line
\n
"
...
...
www/openproj-project.xml.tcl
View file @
3f1c28ab
...
...
@@ -26,7 +26,7 @@ ad_page_contract {
set
today
[
db_string today
"select to_char(now(), 'YYYY-MM-DD')"
]
if
{
0 ==
$user
_id
}
{
set user_id
[
a
d_maybe_redirect_for_registratio
n
]
set user_id
[
a
uth::require_logi
n
]
}
# ---------------------------------------------------------------
...
...
@@ -383,7 +383,7 @@ ad_proc -public im_openproj_write_task {
if
{
""
==
$duration
}
{
set duration
$default
_duration
}
if
{
""
==
$duration
||
[
string
equal
$start
_date
$end
_date
]
}
{
if
{
""
==
$duration
||
$start
_date eq
$end
_date
}
{
set duration 0
}
...
...
www/taskjuggler-import.adp
View file @
3f1c28ab
<master>
<property name="
title">@page_title
@</property>
<property name="context">@context_bar@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">@context_bar
;literal
@</property>
<property name="main_navbar_label">projects</property>
<property name="sub_navbar">@sub_navbar;
noquote
@</property>
<property name="sub_navbar">@sub_navbar;
literal
@</property>
<h1><%= [lang::message::lookup "" intranet-ganttproject.TaskJuggler_Schedule_Successfully_Imported "
...
...
www/taskjuggler-import.tcl
View file @
3f1c28ab
...
...
@@ -21,7 +21,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-ganttproject.TaskJuggler_Import
"TaskJuggler Import"
]
set
context_bar
[
im_context_bar
$page
_title
]
if
{
""
==
$return
_url
}
{
set return_url
[
im_url_with_query
]
}
...
...
www/taskjuggler.adp
View file @
3f1c28ab
<master>
<property name="
title">@page_title
@</property>
<property name="context">@context_bar@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">@context_bar
;literal
@</property>
<property name="main_navbar_label">projects</property>
<property name="sub_navbar">@sub_navbar;
noquote
@</property>
<property name="sub_navbar">@sub_navbar;
literal
@</property>
<!-- ------------------------------------------------------------------------------ -->
...
...
@@ -32,7 +32,7 @@ and import the values into the current project.
<form action=taskjuggler-import method=POST>
<%= [export_vars -form {project_id}] %>
<input type=
submit name=import
value="Import Schedule">
<input type=
"submit" name="import"
value="Import Schedule">
from TaskJuggler into ]project-open[
</form>
www/taskjuggler.tcl
View file @
3f1c28ab
...
...
@@ -22,7 +22,7 @@ ad_page_contract {
# ---------------------------------------------------------------
set
today
[
db_string today
"select to_char(now(), 'YYYY-MM-DD')"
]
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
set
hours_per_day 8.0
set
default_currency
[
im_parameter -package_id
[
im_package_cost_id
]
"DefaultCurrency"
""
"EUR"
]
...
...
@@ -151,7 +151,7 @@ db_foreach project_resources $project_resources_sql {
set user_tj
"
\t
resource r
$person
_id
\"
$user
_name
\"
{
\n
"
if
{
""
!=
$hourly
_cost
}
{
append user_tj
"
\t\t
rate
[
expr
$hourly
_cost *
$hours
_per_day
]
\n
"
append user_tj
"
\t\t
rate
[
expr
{
$hourly
_cost *
$hours
_per_day
}
]
\n
"
}
# ---------------------------------------------------------------
...
...
www/test/single-task.tcl
View file @
3f1c28ab
...
...
@@ -26,7 +26,7 @@ ad_page_contract {
# Defaults & Security
# ---------------------------------------------------------------
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
set
user_is_admin_p
[
im_is_user_site_wide_or_intranet_admin
$user
_id
]
if
{
!$user_is_admin_p
}
{
ad_return_complaint 1
"This page is only accessible for administrators"
...
...
@@ -120,7 +120,7 @@ if {[set resource_node [$root_node selectNodes /project/resources]] == ""} {
set resource_node
[
$root
_node selectNodes -namespace
{
"project"
"http://schemas.microsoft.com/project"
}
"project:Resources"
]
}
if
{
$resource
_node
!=
""
}
{
if
{
$resource
_node
ne
""
}
{
set resource_hash_array
[
im_gp_save_resources -debug_p
$debug
_p
$resource
_node
]
array set resource_hash
$resource
_hash_array
}
...
...
@@ -143,7 +143,7 @@ if {[set allocations_node [$root_node selectNodes /project/allocations]] == ""}
set allocations_node
[
$root
_node selectNodes -namespace
{
"project"
"http://schemas.microsoft.com/project"
}
"project:Assignments"
]
}
if
{
$allocations
_node
!=
""
}
{
if
{
$allocations
_node
ne
""
}
{
im_gp_save_allocations
\
-debug_p
$debug
_p
\
$allocations
_node
\
...
...
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