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 346099 - more granular time chosing
more granular time chosing
Status: RESOLVED FIXED
Product: planner
Classification: Other
Component: General
unspecified
Other All
: Normal enhancement
: ---
Assigned To: planner-maint
planner-maint
: 393740 568397 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-06-28 11:40 UTC by Thorsten Sick
Modified: 2009-04-02 02:51 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Diff for planner-format.c (1.10 KB, patch)
2008-10-28 17:20 UTC, Joshua Rowley
none Details | Review

Description Thorsten Sick 2006-06-28 11:40:14 UTC
I am lpanning events (more exactly Live Action Role Playing Games). The normal duration of this event is about 2 days with a week of organizing beforehand.

During these two days there are many parallel tasks I want to plan. They can only be 10 minutes long and start at a very exact time (maybe midnight).

Can you please adjust planner to allow durations passed in minutes/hours and start times not in days but more exact (up to minutes/hours) to allow events to be planned.


Thanks a lot for planner
Thorsten Sick
Comment 1 Fabio Bonelli 2006-06-28 17:18:03 UTC
Re-assigning to planner. :-)
Comment 2 Ulrich.Windl 2006-11-09 09:46:39 UTC
I'd appreciate the ability to enter hours directly as well (not using fractional days). "1 H" never worked in 0.13 for me...
Comment 3 Alexander Wahl 2008-01-24 23:07:25 UTC
I'm also interrested in creating task items, with a duration under on hour.

Thanks
Alexander Wahl
Comment 4 dan trevino 2008-05-02 14:48:46 UTC
+1 on this feature request.
Comment 5 Cosimo Cecchi 2008-07-31 12:14:54 UTC
*** Bug 393740 has been marked as a duplicate of this bug. ***
Comment 6 Joshua Rowley 2008-10-28 15:37:25 UTC
Hi All.

I needed this too - and have just written a patch to resolve it ( it is just a display / unit problem and was very simple to resolve. I will submit shortly for review.

Josh
Comment 7 Maurice van der Pot 2008-10-28 16:08:18 UTC
I'm curious to know what you changed.
I've always been able to enter times in a number of hours (1h) or even in minutes (30mins).
Comment 8 Joshua Rowley 2008-10-28 17:20:37 UTC
Created attachment 121524 [details] [review]
Diff for planner-format.c
Comment 9 Joshua Rowley 2008-10-28 17:20:56 UTC
It's the display of minutes which was screwed up. 

0.5h does not get shown in the task list - the cell is blank as the code did not cater for minutes.

I have augmented planner_format_duration_with_day_length to allow for minutes to be displayed. Also, I added 'm' to the units array to allow the displayed result with minutes to be parsed correctly.

If you are happy with my changes and want to commit to trunk, that would be great.

Additionally, I'd be happy to lend a hand with any other issues that need looking at. It's a great project.

Diff is attached.

Josh
Comment 10 Maurice van der Pot 2008-12-14 18:07:24 UTC
Thanks for your patch, Joshua, but there are a few things that need to be changed before I can apply it.

1) The patch is reversed. Create it with diff -ruN planner-svn planner-local instead. That will also use unified diff format, which is the preferred patch format. Running 'svn diff' will do this for you automatically.

2) Make hour_length and minute_length const.

3) Use translated strings for units (see the units array around line 387). The original code wasn't doing this, but you may as well fix that while you're changing it. As you'll see the abbreviation for minutes is actually "min" to prevent ambiguity with the abbreviation for months.

4) Instead of strcatting to a preallocated buffer, use g_strconcat() to create a new string from all parts. Also don't forget to free the strings that are allocated by g_strdup_printf when you're done with them.
Comment 11 Maurice van der Pot 2009-01-24 17:28:18 UTC
*** Bug 568397 has been marked as a duplicate of this bug. ***
Comment 12 Kurt Maute 2009-04-02 02:51:20 UTC
Didn't see this bug out here until just now - committed my own patch for this, so this is now resolved.