Author Topic: eGroupware ProjectManager bug  (Read 1799 times)

martinique

  • Zen Monk
  • **
  • Posts: 65
  • Karma: +2/-0
    • View Profile
eGroupware ProjectManager bug
« on: November 11, 2009, 02:59:25 pm »
When I try to add a subproject in ProjectManager (eBox 1.2), the subproject is incorrectly displayed as a mainproject. Sounds a lot like the bug described here: http://old.nabble.com/-1937---PostgreSQL:-Subprojects-are-displayed-as-mainprojects-td25903892.html

I did a quick grep and found a line that looks like the one described, so apparently ebox-egroupware needs that fix. I could replace the "CHAR" with "VARCHAR" as described in the proposed fix, but then I'd be afraid to update eBox until it's permanently fixed.

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: eGroupware ProjectManager bug
« Reply #1 on: November 11, 2009, 09:16:55 pm »
I don't see any problem if you update any eBox package. That file that you have modified is part of the source code of egroupware, eBox won't touch anything. It only touches the header configuration and the database.
Zentyal Server Lead Developer

martinique

  • Zen Monk
  • **
  • Posts: 65
  • Karma: +2/-0
    • View Profile
Re: eGroupware ProjectManager bug
« Reply #2 on: November 12, 2009, 08:04:25 am »
I was under the impression that a local change would eventually be overwritten by a package upgrade, which (with a little bad luck) might contain an eGroupware version older than that bug (pre-r28117), but I'll just have to trust that you experts know what you're talking about. :)

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: eGroupware ProjectManager bug
« Reply #3 on: November 12, 2009, 10:13:17 am »
The egroupware packages are backported to hardy by us. If a new version is available I suppose that bug will be fixed, but in any case the package is controlled by us so don't worry, we'll be careful with this.
Zentyal Server Lead Developer

martinique

  • Zen Monk
  • **
  • Posts: 65
  • Karma: +2/-0
    • View Profile
Re: eGroupware ProjectManager bug
« Reply #4 on: November 13, 2009, 11:18:34 am »
There was another eGroupware file that I needed to change before everything worked as expected. In fact it was mentioned in code comments that PostgreSQL 8.3 requires these changes. Other database engines probably work out of the box, but since PG is the default in eBox, I thought I should mention the complete fix here. Note that the bug isn't apparent until you add about 10 (sub)projects.

So, if anyone else comes across this problem in ProjectManager, here's how to fix it until a newer version of eGroupware is released with eBox:

Edit /usr/share/egroupware/projectmanager/inc/class.projectmanager_so.inc.php
There's a line containing "pm_id AS CHAR" (excluding the quotes). Change it into "pm_id AS VARCHAR".

Then edit /usr/share/egroupware/projectmanager/inc/class.projectmanager_elements_so.inc.php
There are 2 lines containing that same string, so change them too.

If you got some messed-up entries in your ProjectManager before applying this fix, try using the "Synchronize All" button to correct them. Apparently it worked for me, but I'll keep following the situation. I'd also like to know if someone can confirm this behaviour and that the fix really works.
« Last Edit: November 13, 2009, 11:51:23 am by martinique »

martinique

  • Zen Monk
  • **
  • Posts: 65
  • Karma: +2/-0
    • View Profile
Re: eGroupware ProjectManager bug
« Reply #5 on: November 13, 2009, 02:24:53 pm »
There's still something else wrong with ProjectManager, because sometimes subprojects are linked wrong and appear under incorrect parent projects, in addition to where they should be.

Those can be corrected quite easily by removing the faulty links from such subprojects, but it gets pretty annoying after adding dozens of projects and constantly checking if they pop up in the wrong places. I hope this weird behaviour will be fixed in future versions packaged with eBox.

Another lesser annoyance is that in tree view mode the project navigation tree grows too wide very quickly and overlaps with the main view, which looks really ugly. The easiest fix is to switch to another view mode, but those make navigation quite unintuitive. Someone needs to add an overflow-x:scroll or something to the template CSS. Maybe I'll try that...

Edit: The above CSS bug may be somewhat browser-specific, but at least I managed to fix it for Firefox. The much-needed overflow definition was there, but there was no width defined for the parent element, so scrollbars never appeared. Adding this line to /usr/share/egroupware/phpgwapi/templates/jerryr/css/jerryr.css fixed it:
#foldertree {width: 200px}
Looks good now. :)
« Last Edit: November 13, 2009, 02:55:45 pm by martinique »