GNOME Bugzilla – Bug 590705
Insert tasks... dialog work field doesn't parse units and always uses days
Last modified: 2012-08-31 14:06:41 UTC
Test realized with ubuntu jaunty and planner 0.14.3 (observed too in this 0.14.4 version used in ubuntu jaunty : http://http.us.debian.org/debian/pool/main/p/planner/planner_0.14.4-1_i386.deb ) : Using insert task, if i put 0,5h no problems we can see on grantt diagramme the correspondent value Using insert taskS if i put 0,5h (or 0.5h) it's transforming to 4h (gantt + collumn) 0.9h transforming to 7h 0.2h to 1h... Other people have this problem ?
With this version( 0.14.4-1 version used in ubuntu jaunty : http://http.us.debian.org/debian/pool/main/p/planner/planner_0.14.4-1_i386.deb ) there is transformation but including hours without "." (ex : 2h) Always with insert taskS (no problem if i editing the colomns on the left) the transformation for 0.14.4-1 is : 2h become 2 days 3min become 3 days ...
I can confirm this, it also happens with 0.14.2. The bug happens when using the "Actions -> Insert tasks..." dialog. After some more tests, I managed to get some more details about what happens: the unit is not parsed and only the quantity is used as the number of days (thus 0.5h becomes 0.5 day, which means 4h with standard calendar).
Created attachment 143572 [details] [review] use planner_parse_duration in task_input_dialog_response_cb
The code expected that the user has entered a number of days : -8<-- work = 60*60*8 * g_strtod (workstr, NULL); -8<-- My patch use planner_parse_duration to make the conversion, so that you can enter a planner duration. The additionnal benefit is that planner_parse_duration takes the day length from the project properties, so that a day length is not always considered to be 8 hours.
Review of attachment 143572 [details] [review]: I'm pushing this to master ASAP.
Thank you for your contribution. This has been pushed to master and will be included in the next release.
Thanks Alexandre. What a pleasure to see a 3 years old one-liner to be finally integrated ! Are you starting a revival on planner ?
Let's just say I'm not doing a great job as a maintainer, but I'm trying to fix that. :)