After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590705 - Insert tasks... dialog work field doesn't parse units and always uses days
Insert tasks... dialog work field doesn't parse units and always uses days
Status: RESOLVED FIXED
Product: planner
Classification: Other
Component: General
0.14.x
Other Linux
: Normal major
: ---
Assigned To: planner-maint
planner-maint
Depends on:
Blocks:
 
 
Reported: 2009-08-04 07:56 UTC by pepe
Modified: 2012-08-31 14:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use planner_parse_duration in task_input_dialog_response_cb (744 bytes, patch)
2009-09-21 09:00 UTC, Arthur Petitpierre
committed Details | Review

Description pepe 2009-08-04 07:56:58 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 ?
Comment 1 pepe 2009-08-04 08:10:11 UTC
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
...
Comment 2 Alexandre Franke 2009-08-04 16:58:16 UTC
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).
Comment 3 Arthur Petitpierre 2009-09-21 09:00:27 UTC
Created attachment 143572 [details] [review]
use planner_parse_duration in task_input_dialog_response_cb
Comment 4 Arthur Petitpierre 2009-09-21 09:06:23 UTC
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.
Comment 5 Alexandre Franke 2012-08-30 17:22:53 UTC
Review of attachment 143572 [details] [review]:

I'm pushing this to master ASAP.
Comment 6 Alexandre Franke 2012-08-30 17:24:30 UTC
Thank you for your contribution. This has been pushed to master and will be included in the next release.
Comment 7 Arthur Petitpierre 2012-08-31 12:35:27 UTC
Thanks Alexandre.
What a pleasure to see a 3 years old one-liner to be finally integrated !
Are you starting a revival on planner ?
Comment 8 Alexandre Franke 2012-08-31 14:06:41 UTC
Let's just say I'm not doing a great job as a maintainer, but I'm trying to fix that. :)