mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
Do not allow due or finish before start when copying from projectmanager template
This commit is contained in:
parent
0405eb1510
commit
c987e5b013
@ -138,6 +138,15 @@ class infolog_datasource extends datasource
|
||||
$info[$info_field] = date_add(new Api\DateTime($info[$info_field]), $date_offsets[$offset_field])->format('ts');
|
||||
}
|
||||
}
|
||||
// Sanity check - not due or ended before it starts
|
||||
if($info['info_startdate'] && $info['info_enddate'] && $info['info_startdate'] > $info['info_enddate'])
|
||||
{
|
||||
unset($info['info_enddate']);
|
||||
}
|
||||
if($info['info_startdate'] && $info['info_datecompleted'] && $info['info_startdate'] > $info['info_datecompleted'])
|
||||
{
|
||||
unset($info['info_datecompleted']);
|
||||
}
|
||||
|
||||
if(!($info['info_id'] = $this->infolog_bo->write($info))) return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user