From b1ac7a0cca0ace6aecd3ee650e3029ca16709831 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 5 Jan 2015 13:49:28 -0500 Subject: [PATCH] MultipleBookingsFieldName can be set to -1 --- Documentation/SOGoInstallationGuide.asciidoc | 6 ++++-- NEWS | 3 +++ SoObjects/Appointments/SOGoAppointmentObject.m | 4 ++-- SoObjects/SOGo/SOGoUser.m | 2 +- SoObjects/SOGo/SOGoUserManager.h | 5 +---- SoObjects/SOGo/SOGoUserManager.m | 5 +---- UI/MainUI/SOGoUserHomePage.m | 7 +++++-- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Documentation/SOGoInstallationGuide.asciidoc b/Documentation/SOGoInstallationGuide.asciidoc index 08c819154..07c7715ff 100644 --- a/Documentation/SOGoInstallationGuide.asciidoc +++ b/Documentation/SOGoInstallationGuide.asciidoc @@ -911,7 +911,8 @@ resource if the entry has the calendarresource objectClass set. to which a resource can be part of at any point in time. If this is set to `0`, or if the attribute is missing, it means no -limit. +limit. If set to `-1`, no limit is imposed but the resource will +be marked as busy the first time it is booked. |filter (optional) |The filter to use for LDAP queries, it should be defined as an @@ -1476,7 +1477,8 @@ case, SOGo will consider the returned entry to be a resource. which a resource can be part of at any point in time. If this is set to `0`, or if the attribute is missing, it means no -limit. +limit. If set to `-1`, no limit is imposed but the resource will +be marked as busy the first time it is booked. |DomainFieldName (optional) |If set, SOGo will use the value of that field as the domain associated diff --git a/NEWS b/NEWS index 8826b62c2..691b61f85 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ 2.2.14 (2015-MM-DD) ------------------- +Enhancements + - MultipleBookingsFieldName can be set to -1 to show busy status when booked at least once + Bug fixes - fixed calendar selection in event and task editors (#3049, #3050) diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 1d7538da1..64baf52d7 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -637,10 +637,10 @@ if ([fbInfo count]) { - // If we always force the auto-accept if numberOfSimultaneousBookings == 0 (ie., no limit + // If we always force the auto-accept if numberOfSimultaneousBookings <= 0 (ie., no limit // is imposed) or if numberOfSimultaneousBookings is greater than the number of // overlapping events - if ([user numberOfSimultaneousBookings] == 0 || + if ([user numberOfSimultaneousBookings] <= 0 || [user numberOfSimultaneousBookings] > [fbInfo count]) { if (currentAttendee) diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index 8f2768571..da0ed8c6c 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -1,5 +1,5 @@ /* - Copyright (C) 2006-2013 Inverse inc. + Copyright (C) 2006-2015 Inverse inc. Copyright (C) 2005 SKYRIX Software AG This file is part of SOGo. diff --git a/SoObjects/SOGo/SOGoUserManager.h b/SoObjects/SOGo/SOGoUserManager.h index 6564e10b2..237347053 100644 --- a/SoObjects/SOGo/SOGoUserManager.h +++ b/SoObjects/SOGo/SOGoUserManager.h @@ -1,9 +1,6 @@ /* SOGoUserManager.h - this file is part of SOGo * - * Copyright (C) 2007-2013 Inverse inc. - * - * Author: Wolfgang Sourdeau - * Francis Lachapelle + * Copyright (C) 2007-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/SoObjects/SOGo/SOGoUserManager.m b/SoObjects/SOGo/SOGoUserManager.m index 03cf78e62..d8e09ba6c 100644 --- a/SoObjects/SOGo/SOGoUserManager.m +++ b/SoObjects/SOGo/SOGoUserManager.m @@ -1,9 +1,6 @@ /* SOGoUserManager.m - this file is part of SOGo * - * Copyright (C) 2007-2013 Inverse inc. - * - * Author: Wolfgang Sourdeau - * Francis Lachapelle + * Copyright (C) 2007-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/UI/MainUI/SOGoUserHomePage.m b/UI/MainUI/SOGoUserHomePage.m index 1345e214c..feb757835 100644 --- a/UI/MainUI/SOGoUserHomePage.m +++ b/UI/MainUI/SOGoUserHomePage.m @@ -1,6 +1,6 @@ /* SOGoUserHomePage.m - this file is part of SOGo * - * Copyright (C) 2007-2014 Inverse inc. + * Copyright (C) 2007-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -104,7 +104,7 @@ isResource = [user isResource]; // Don't fetch freebusy information if the user is of type 'resource' and has unlimited bookings - if (!isResource || maxBookings > 0) + if (!isResource || maxBookings != 0) { for (recordCount = 0; recordCount < recordMax; recordCount++) { @@ -189,6 +189,9 @@ } } +// +// +// - (NSString *) _freeBusyFromStartDate: (NSCalendarDate *) startDate toEndDate: (NSCalendarDate *) endDate forFreeBusy: (SOGoFreeBusyObject *) fb