@ -809,6 +809,7 @@ Timeline = {
var dataEnhancer = this ;
jQuery . each ( dataEnhancer . getElements ( Timeline . Reporting ) , function ( i , reporting ) {
// TODO this somehow didn't make the change to reporting_to_project_id and project_id.
var project = dataEnhancer . getElement ( Timeline . Project , reporting . reporting _to _project . id ) ;
var reporter = dataEnhancer . getElement ( Timeline . Project , reporting . project . id ) ;
@ -836,13 +837,13 @@ Timeline = {
} ;
DataEnhancer . prototype . augmentProjectsWithProjectTypesAndAssociations = function ( ) {
var dataEnhancer = this ;
var dataEnhancer = this ;
jQuery . each ( dataEnhancer . getElements ( Timeline . Project ) , function ( i , e ) {
// project_type ← project
if ( e . project _type !== undefined ) {
var project _type = dataEnhancer . getElement ( Timeline . ProjectType , e . project _type . id ) ;
var project _type = dataEnhancer . getElement ( Timeline . ProjectType , e . project _type _ id) ;
if ( project _type ) {
e . project _type = project _type ;
@ -908,29 +909,27 @@ Timeline = {
} ;
DataEnhancer . prototype . augmentPlanningElementWithType = function ( pe ) {
// planning_element → planning_element_type
if ( pe . planning _element _type ) {
pe . planning _element _type = this . getElement ( Timeline . PlanningElementType ,
pe . planning _element _type . id ) ;
}
else {
pe . planning _element _type = undefined ;
}
// planning_element → planning_element_type
if ( pe . type _id ) {
pe . planning _element _type = this . getElement ( Timeline . PlanningElementType ,
pe . type _id ) ;
}
delete pe . type _id ;
} ;
DataEnhancer . prototype . augmentPlanningElementWithProject = function ( pe ) {
var project = this . getElement ( Timeline . Project , pe . project . id ) ;
var project = this . getElement ( Timeline . Project , pe . project _ id) ;
// there might not be such a project, due to insufficient rights
// and the fact that some user with more rights originally created
// the report.
if ( ! project ) {
// TODO some flag indicating that something is wrong/missing.
return ;
}
// there might not be such a project, due to insufficient rights
// and the fact that some user with more rights originally created
// the report.
if ( ! project ) {
// TODO some flag indicating that something is wrong/missing.
return ;
}
// planning_element → project
pe . project = project ;
// planning_element → project
pe . project = project ;
} ;
DataEnhancer . prototype . augmentPlanningElementWithParent = function ( pe ) {