meeting-room-booking-system / mrbs-code

MRBS application code
Other
110 stars 56 forks source link

all day / multidays bookings #2740

Open jberanek opened 4 years ago

jberanek commented 4 years ago

Good day,

On v1.8.0 snapshot 5e946c, all day bookings display as "<====All day====>" i.e. HTML tags are not rendered as "less", "greater" and "non breaking space" chars. I checked whether there was a config setting to turn HTML on/off but didn't spot one (and don't remember one in older versions). The first day of multi-days all day bookings shows as" All day====&gt" i.e. the starting "<====" part is missing. The next days are displaying OK (short of the HTML problem above). See pic.

Also, when trying to re-edit multi-days bookings, the "all day" box isn't ticked. I can't remember if that was the case in older versions. Saving is OK though, it still shows the "all day" message.

Thanks.

Treblig

Reported by: treblig-fr

Original Ticket: mrbs/support-requests/2045

Attachments: https://sourceforge.net/p/mrbs/support-requests/2045/attachment/mrbs.jpg

jberanek commented 4 years ago

I've now fixed the HTML entities problem in the default branch.

No, I don't think the All Day box should be ticked unless the booking spans all day on each day of the booking.

Original comment by: campbell-m

jberanek commented 4 years ago

Hi Campbell,

Thanks, I'll reload the snapshot and let you know how it goes.

In my example, it was a one booking that spanned across 3 "all day" days. I picked the first date (May 5th), the last date (May 7th), didn't pick times and clicked the All Day box. Last day (May 7th) time changes to 00:00 (which is fine, an All Day day ending at at midnight sounds legit. Time of the first day could as well change to 00:00 too when ticking the All Day box instead of picking the fist working hour)

When I edited that one "3 days" booking to change the description, MRBS treated it as one booking (which is what I'm expecting) however, the last day changed to May 8th (next day) and time changed to 07:00 (first working hour for that area) and the All Day box was unticked (not what I was expecting since I checked and validated All Day previously). Visually it's OK but why change what the user validated ?

It's the same for a single all day booking. Unless I do it wrong (option not to be discarded...), the All Day box never gets ticked when editing an All Day booking. Is there an All Day flag kept ? I honestly don't remember if that unticking was the way it worked previously but I'd rather get what I initially validated.

I see a potential issue with the "shifting of time and day". Let's say the resource (room / equipment) booked is billed by the hour with a preferred tarif for bookings, say, over 7 or 8 consecutive hours on the same day. Someone pulling the data from the DB to invoice is likely to get it wrong if date and time shifts to the next day for All Day bookings. I don't know if it's a concern for your users (it's not for me I don't bill the resources anyway).

Regards,

Treblig

Original comment by: treblig-fr

jberanek commented 4 years ago

Good Day,

With the new snapshot uploaded the HTML tags are displayed OK but the content seems weird (see pic).

Treblig

Original comment by: treblig-fr

Attachments: https://sourceforge.net/p/mrbs/support-requests/_discuss/thread/aace2c2c26/bf09/994e/attachment/mrbs.jpg

jberanek commented 4 years ago

That's the way it's been since at least MRBS 1.6.1. I agree it doesn't look great though and will look at redesigning it over the next few days.

Original comment by: campbell-m

jberanek commented 4 years ago

I can't reproduce this. What have you got your day start and end times and resolution set to?

There isn't an All Day flag. Ticking that box just means "make the booking go from the beginning of the first slot until the end of the last slot". And when you edit a booking the box should be automatically ticked if that condition is met.

It sounds like there is a bug - I just can't reproduce it. I think the problem in your case was the time changing to 0000, which I wouldn't have expected it to. That's midnight at the start of the day not midnight at the end of the day. That's why when you came to edit it the All Day box wasn't ticked.

Original comment by: campbell-m

jberanek commented 4 years ago

Hi Campbell,

Here's how the area is set (see pic).

My install is on a Linux server running MySQL 5.6 and PHP 7.3. When I first installed 1.8.0 "latest version" (not a snapshot) I linked it to the tables of an old install (may have been 1.4.1 but I'm not sure) and used the old config.inc.php file (I had to remove some variables which 1.8.0 said were now invalid). 1.8.0 asked to run some kind of update (can't remember the exact wording) on the MRBS tables which I accepted.

To install the latest snapshot, I deleted the content of the directory where I had first installed 1.8.0 last week, only keeping the config file and then uploaded the latest snapshot.

regards.

Treblig

Original comment by: treblig-fr

Attachments: https://sourceforge.net/p/mrbs/support-requests/_discuss/thread/aace2c2c26/bf09/a16a/9896/attachment/mrbs.jpg

jberanek commented 4 years ago

Ok, thanks. I can reproduce the bug now. It's to do with the fact that your last timeslot ends at midnight. I'll take a look in the next few days.

Original comment by: campbell-m

jberanek commented 4 years ago

OK, thanks.

Would it be a problem that "All Day" starts at 00:00 and ends 24:00 irrespective of the area start/end times ? BTW what happens today to an All Day booking if the area start/end times change ? Say an area is set to 09:00-18:00 when the All Day booking is made and the area times later change to 07:00-18:00 ? Will that All Day booking still have its All Day box checked ?

treblig

Original comment by: treblig-fr

jberanek commented 4 years ago

Would it be a problem that "All Day" starts at 00:00 and ends 24:00 irrespective of the area start/end times ?

Yes, it probably would be a problem if All Day was all 24 hours rather than all of the booking day as it would require lots of things to change. It's probably easier just to stick to the existing model and fix the bug.

BTW what happens today to an All Day booking if the area start/end times change ? Say an area is set to 09:00-18:00 when the All Day booking is made and the area times later change to 07:00-18:00 ? Will that All Day booking still have its All Day box checked ?

No, the All Day box wouldn't be checked. As I say, there's no All Day flag in the database. The All Day box is just a shorthand that triggers the JavasScript to complete the start and end times for you.

Original comment by: campbell-m

jberanek commented 4 years ago

I've now fixed this bug in f437b5.

Original comment by: campbell-m

jberanek commented 4 years ago

Thanks, I'll have a look at it, most likely next week.

Original comment by: *anonymous