Task (closed)

personViewEffort should have group option "project"

Summary

closed
Apr 20, 2007
100%
May 29, 2007
Apr 20, 2007 / pixtur
Aug 5, 2009 / rafael.dalpra
burger
 

Attached files

No files uploaded
 
This task is pretty tricky, because grouping requires several tasks:
  • definition
  • creating selectiong drop down list
  • get current selection from cookie (which is bad)
  • removing/hiding the column with the same id from the table
  • sorting the table
The problem here is to change the order because "project" is ambiguous in the sql statement. It should be named i.project, but currently there is no way to express this.

The whole groupby stuff should be refactored in the next version.


2 Comments

burger:Done ...

11 years ago (3. update 11 years ago)

I have a workaround for the "order by" problem (see code snippet).
if(isset($this->query_options['order_by'])) {
    if($this->groupings->getActiveFromCookie() == 'project'){
	    $this->query_options['order_by'] = "i.project,".$this->query_options['order_by'];
    }
    else{
        $this->query_options['order_by'] = $this->groupings->getActiveFromCookie() . "," .$this->query_options['order_by'];
    }
}
else {
    $this->query_options['order_by'] = $this->groupings->getActiveFromCookie();
}

I don't know if you like it, but I as you have plans to refactor the whole "group by" functionality I thought it's okay for the moment ;).

pixtur:sounds good.

11 years ago (2. update 11 years ago)

btw. If you provide source fragments, I find it very useful to provide the filename of the file like:

 [code from="somefile.inc.php line123" ]
   some changes
 [/code ]