! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Recurrence not recurring at the limit date
Status:
CLOSED: FIXED

Comments

Description Ricardo Nabinger Sanchez 2007-02-22 13:31:59 CET
Steps to reproduce:

1- Enter a new task
2- Enable recurrence, and set it to weekly
3- Insert a date limit to some weeks ahead (so that the end is on the same week day)

Orage will not mark the limit date as recurrent.  Perhaps a '<' instead of '<=' check is the culprit?

In order to this not happen, just set the date limit to a day after the desired limit (ie, instead of "now + 5 weeks", choose "now + 5 weeks + 1 day").

Regards.
Comment 1 juha editbugs 2007-02-22 15:48:11 CET
The reason for this actually is that the limit is actually a date-time value
but Orage tries to make this simpler and only shows the date part and sets 
internally the time part always to 00:00:00, which basically means that events
do not occur on that day.

So it is not just < or <= comparisin, but the whole date-time comparison.

Adding time adjustment is not worth it, so basically I think there are two
options:
1) keep it like it is
2) change the time to be 23:59:59 instead so that it works like suggested
   in this bug.

Aftre reading the docs again...I'll fix it like in 2) soonish.

Thanks for this interesting bug report!
Comment 2 Ricardo Nabinger Sanchez 2007-02-22 17:03:00 CET
(In reply to comment #1)
> Aftre reading the docs again...I'll fix it like in 2) soonish.
> 
> Thanks for this interesting bug report!
> 

Thanks for the quick reply!
Comment 3 juha editbugs 2007-02-22 21:59:11 CET
Fix in svn revision 25018.

Fix will appear in Xfce 4.4.1

(Note that this unfortunately is not the final fix. Correcting this properly needs
much more work.)
Comment 4 juha editbugs 2007-03-15 22:07:29 CET
revision 25173 contains the real fix, which should work correctly in all
situations.

will be part of 4.4.1 Xfce.
Comment 5 juha editbugs 2007-04-12 08:42:48 CEST
in 4.4.1
Comment 6 Ricardo Nabinger Sanchez 2007-04-12 18:34:23 CEST
I've just updated to 4.4.1, but I still can reproduce the bug.

Exactly what I did:

* added a task for April 1st (a sunday), 0900-0930
* named
* set weekly recurrence to 'until 15/apr' (also a sunday)
* saved

In the calendar only April 1st and 8th were bolded, 15th not.  If I set it to 'until 16/apr', then 15th is bolded too.

Anything else I should check?

TIA
Comment 7 juha editbugs 2007-04-12 18:58:56 CEST
I can't reproduce this error.

Does it happen only with Sunday starting period or also if you try with for
example wednesday 04-Apr.

This may be related to ical week startday...

What is the first day of your week? (=the first day in the calendar window)

I reopened this and will check more, but let me know those answers and it helps.
Comment 8 Ricardo Nabinger Sanchez 2007-04-13 02:32:41 CEST
The first day of the week for me is sunday.
Changing the task to wednesday (actually I created another, exactly as reported previously) didn't helped.

Anything else I should do in order to help, like running orage inside gdb?  If so, just give me some hints (where to break) so I can come back briefly with more data.

TIA, once again.  :)
Comment 9 juha editbugs 2007-04-13 15:39:40 CEST
I still can't reproduce this. and It is not very easy to debug..so let's check 
two basic things first:

1) double check that you are indeed using Orage 4.4.1 by clicking 
Help->About
You see 4.4.1 ?

2) I need to see the VEVENT from the orage.ics file from 
~/.config/xfce4/orage

If the file is not too big, upload it all and let me know what event is 
your test event. If it is too big, update the event and let me know the
last VEVENT from that same file.

It is pretty hard to debug with gdb since the fix is inside a function....
Comment 10 Ricardo Nabinger Sanchez 2007-04-16 19:33:25 CEST
Sorry for the long delay to reply.

Q1 -- Yes, Orage 4.4.1.

Q2 -- The VEVENT:

BEGIN:VEVENT
UID:Orage-20070412T200545Z-1001@sauron.lan.box
CATEGORIES:ORAGENOTE
CLASS:PUBLIC
DTSTAMP:20070412T200545Z
CREATED:20070412T200545Z
SUMMARY:dormir
TRANSP:OPAQUE
DTSTART;TZID=America/Sao_Paulo:20070406T090000
DTEND;TZID=America/Sao_Paulo:20070406T093000
RRULE:FREQ=WEEKLY;UNTIL=20070420T000000Z
END:VEVENT

Anything else I might provide?

Thanks again.
Comment 11 juha editbugs 2007-04-16 20:36:20 CEST
I found an error. But it does not explain what you see.

If you can run gdb, do this:
(gdb) b appt_add_internal
Breakpoint 1 at 0x8059ea2: file ical-code.c, line 1268.
(gdb) run


Then modify your event (or create it again) and Orage stops on your breakpoint.
Then do:
(gdb) p appt->recur_until
$1 = "20070420T235910\000"

Your recur_until is what is the interesting thing. I hardcoded it to be always
235910: (in appointment.c lines 630-632):
        g_sprintf(appt->recur_until, XFICAL_APPT_TIME_FORMAT
                , current_t.tm_year + 1900, current_t.tm_mon + 1
                , current_t.tm_mday, 23, 59, 10);


 but your Orage stores 000000, which is what 4.4.0 did.

so let's check this from gbd. Let me know what your gdb shows as your recur
until time.


(There is error when Orage retrieves the value from disk. Orage calculates 
this sane date wrong, which I need to fix, but it should not be visible this
way)

Comment 12 juha editbugs 2007-04-22 19:57:48 CEST
added fix for moving day into svn revision 25625.
(has nothign to do with the current issue we are checking, but is supposed to
be the last missing piece of fixing this whole thing)
Comment 13 Ricardo Nabinger Sanchez 2007-04-24 00:16:44 CEST
It works OK now, but only for newly added tasks.  While editing it, under gdb, I got this:

(gdb) p *appt
$3 = {uid = 0x8330800 "Orage-20070412T200545Z-1001@sauron.lan.box", 
  title = 0x833e670 "dormir", location = 0x833e680 "", allDay = 0, 
  starttime = "20070406T090000\000", start_tz_loc = 0x833c040 "America/Sao_Paulo", 
  endtime = "20070406T093000\000", end_tz_loc = 0x833c060 "America/Sao_Paulo", 
  use_duration = 0, duration = 1800, availability = 1, note = 0x833e690 "", 
  alarmtime = 0, sound = 0x833e6a0 "", alarmrepeat = 0, 
  starttimecur = "\0000070406T090000\000", endtimecur = "\0000070406T093000\000", 
  freq = XFICAL_FREQ_WEEKLY, recur_limit = 2, recur_count = 0, 
  recur_until = "20070420T235910\000", recur_byday = {1, 1, 1, 1, 1, 1, 1}, 
  recur_byday_cnt = {0, 0, 0, 0, 0, 0, 0}, interval = 1}

As I cannot create a task which isn't correctly highlighted, I'd consider this bug as resolved+fixed.

Thanks for the help!  :)
Comment 14 juha editbugs 2007-04-24 05:31:30 CEST
thanks. now it works as expected.
Hard to understand what the original issue was. The only explanation I can give 
is that somehow you had old code from old 4.4.0 version.

Anyway, there is still one bug, which causes the repeat end date to be
incremented if you use several saves. That has een fixed in svn and will appear
in 4.4.2

closing this bug

Bug #2937

Reported by:
Ricardo Nabinger Sanchez
Reported on: 2007-02-22
Last modified on: 2007-04-24

People

CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information