/**
  * Return number of percents this object is done
  * 
  * If $based_on_tasks == true calculate the percent_done based on task completion
  * Else it will return the custom field value setted by the user
  * 
  * @param $based_on_tasks bool
  * @return integer
  */
 function getPercentsDone($based_on_tasks = true)
 {
     return $based_on_tasks ? parent::getPercentsDone() : $this->getCustomField1();
 }