Commit de358da2 authored by Frank Bergmann's avatar Frank Bergmann

- Created a default value for "effort_driven_type_id" in ]po[

parent bf510ddc
......@@ -32,6 +32,7 @@
<parameter scope="instance" datatype="number" min_n_values="1" max_n_values="1" name="GanttProjectThumbnailSize" default="360x360" description="Default size for GanttProject thumbnails. A typical value for a 1024x768 screen resolution is 360x360"/>
<parameter scope="instance" datatype="number" min_n_values="1" max_n_values="1" name="GanttProjectType" default="Gantt Project" description="Gantt components only appear in projects of a particular type, because the Gantt diagram doesn't make much sense in translation projects, for example. This parameter refers to the root category of projects where the GanttComponent should appear."/>
<parameter scope="instance" datatype="number" min_n_values="1" max_n_values="1" name="UpdatePercentCompletedP" default="0" description="Should imports from MS-Project overwrite the im_projects.percent_completed field? Ususally the project advance is determined by users in ]po[, so the default value is '0'."/>
<parameter scope="instance" datatype="number" min_n_values="1" max_n_values="1" name="DefaultEffortDrivenTypeId" default="9722" description="What measure of a task should the Gantt Editor keep constant when adding resources or increasing the work of a task? 9720: 'Fixed Units': Keep the assigned resources percentage the same, 9721: 'Fixed Duration' - Keep start- and end-date the same or 9722: 'Fixed Work' - Keep the estimated hours the same. These values are defined in category type 'Intranet Timesheet Task Fixed Task Type'. Default is 9722 'Fixed Work' to stay compatible with previous ]po[ semantics."/>
</parameters>
</version>
......
......@@ -147,6 +147,11 @@ ad_proc -public im_ms_project_write_task {
} else {
set base_url "http://[ad_host][ad_port]"
}
# Default "Effort Driven" type of task.
# 9720 is default for MS-project, but 9722 is the default for ]po[ semantics...
set default_effort_driven_type_id [parameter::get_from_package_key -package_key "intranet-ganttproject" -parameter "DefaultEffortDrivenTypeId" -default "9722"]
set task_view_url "$base_url/intranet-timesheet2-tasks/new?task_id="
set project_view_url "$base_url/intranet/projects/view?project_id="
......@@ -254,7 +259,7 @@ ad_proc -public im_ms_project_write_task {
regsub -all "\t" $value " " value
}
Type {
if {![info exists effort_driven_type_id] || "" == $effort_driven_type_id} {set effort_driven_type_id 9720}
if {![info exists effort_driven_type_id] || "" == $effort_driven_type_id} {set effort_driven_type_id $default_effort_driven_type_id }
set value [util_memoize [list db_string type "select aux_int1 from im_categories where category_id = $effort_driven_type_id" -default ""]]
if {"" == $value} {
ad_return_complaint 1 "im_ms_project_write_task: Unknown fixed task type '$effort_driven_type_id'"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment