Closed Bug 669262 Opened 8 years ago Closed 7 years ago

Lightning cannot do semi-monthly entries

Categories

(Calendar :: Dialogs, enhancement)

Lightning 2.3
All
Other
enhancement
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: overlordq, Assigned: bv1578)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
Build ID: 20110615151330

Steps to reproduce:

Attempt to add a semi-montly entry.

While you can select a biweekly sechedule, you're unable to select a semi-monthly schedule.


Actual results:

Cannot do it


Expected results:

Can do it
By "semi-montly" you mean something like repeats custom > monthly, every two months?
Semimonthly as in twice a month[1]. 

Commonly used in most payroll systems, either the first of the month and the 15th, or the 15th and the last day of the month.

While currently I can specify a custom recurrence and select the 15th, if I select the 31st, on months without 31 days the second recurrence wont happen.

1 - http://en.wiktionary.org/wiki/semimonthly
This could be resolved by allowing multiple re-occurrences per event.

I can do:
1) Every 1 Month >> 15th
2) Custom>> Repeat Monthly >> Every 1 Month >> Last >> Day of the month

But I can do both on the same event.
You can apply only one recurrence rule to each event. Allowing multiple recurrence rules could be an enhancement request. But I don't know if the iCalendar specification supports it. Currently you can easily workaround by creating two events with one recurrence rule on each.
I dont see why it shouldn't be able to, from RFC 5545[1].

--
      Monthly on the first and last day of the month for 10 occurrences:

       DTSTART;TZID=America/New_York:19970930T090000
       RRULE:FREQ=MONTHLY;COUNT=10;BYMONTHDAY=1,-1

       ==> (1997 9:00 AM EDT) September 30;October 1
           (1997 9:00 AM EST) October 31;November 1,30;December 1,31
           (1998 9:00 AM EST) January 1,31;February 1
--

Should be able to just say BYMONTHDAY=15,-1 to say the 15th day and the last day.


http://tools.ietf.org/html/rfc5545#section-3.8.5.3
This bug is something like "Allow Lightning's UI to set the last day of the month in a BYMONTHDAY rule".

Actually Lightning can handle events with BYMONTHDAY rule and any negative numbers, i.e. days relative to the last day of the month (-1 is the last day of the month). 
Events like those reported in comment #5 are correctly displayed in Lightning, but they can't be created or modified due to missing features in the user interface.

In the past I tried to create an UI that handled all the negative days present in the BYMONTHDAY rule, but it was decided that in general it could be matter for an extension due to a non common use of this kind of rules (and also because the interface wasn't so intuitive ;-) ).

Maybe we can do an exception only for the "last day of the month" with a simple change in the monthly daypicker like that proposed in the screenshot, i.e. by adding a "last day" button.
The image is a mockup and it's completely different from the work I did for the other interface, but (hopefully) it shouldn't be so complicated.

What's your opinion Philipp? The ui review request is only to let you add this to the end of your long tasks queue ;-)
Attachment #562024 - Flags: ui-review?(philipp)
Comment on attachment 562024 [details]
proposal: "last day of the month" button in the daypicker

Looks good to me, I think we should give it a try.
Attachment #562024 - Flags: ui-review?(philipp) → feedback+
Attached patch patch - v1Splinter Review
The daypicker needs only minimal changes to handle the "last day of the month" and a fews others to handle the new string in the function recurrenceRule2String().
I've also changed the background image of the daypickers with the linear-gradient css property like had been done in others Lightning's UI elements. In this way the file daypicker-background.png becomes useless and the same for the image and the stack in the daypicker binding. I've verified that the anonid and class attributes are not used elsewhere.
Assignee: nobody → bv1578
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #709363 - Flags: review?(matthew.mecca)
Severity: normal → enhancement
Component: General → Dialogs
Version: Lightning 1.0b4 → Lightning 2.3
Comment on attachment 709363 [details] [diff] [review]
patch - v1

Review of attachment 709363 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. r=mmecca

::: calendar/base/modules/calRecurrenceUtils.jsm
@@ +200,5 @@
> +                            if (lastDay) {
> +                                day_string += getRString("monthlyLastDay") + ", ";
> +                            }
> +                            day_string = day_string.slice(0,-2).
> +                                         replace(/,(?= [^,]*$)/, ' ' + getRString("repeatDetailsAnd"));

nit: when wrapping on a dot, the dot should start the second line instead of ending the first
Attachment #709363 - Flags: review?(matthew.mecca) → review+
(In reply to Matthew Mecca [:mmecca] from comment #9)

> nit: when wrapping on a dot, the dot should start the second line instead of
> ending the first

Fixed in the changeset.


Pushed to comm-central changeset ceeb14e60750

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.3
You need to log in before you can comment on or make changes to this bug.