Hi Kevin,
This fix should work on versions prior to 6.0.0 where someone actaully sees the issu, and will correct the display in Detail view. The fix is included in 6.0.0.
Cheers
Roger
/**** EventsGet ****/
ALTER PROCEDURE {databaseOwner}[{objectQualifier}EventsGet]
(
@EventID int,
@ModuleID int
)
AS
SET DATEFORMAT mdy
CREATE Table #RealModuleID
(EventID Int,
ModuleID Int)
Insert into #RealModuleID (EventID, ModuleID) Select distinct e.EventID, e.ModuleID
From {databaseOwner}[{objectQualifier}Events] e
left outer join {databaseOwner}[{objectQualifier}EventsMaster] m ON e.ModuleID = m.SubEventID
WHERE EventID = @EventID
And (e.ModuleID = @ModuleID Or m.ModuleID = @ModuleID)
SELECT E.PortalID, E.EventID, E.RecurMasterID, E.ModuleID, E.EventDateBegin, E.EventDateEnd,
E.EventTimeBegin, E.Duration, E.EventName, E.EventDesc,
E.Importance, E.CreatedDate,
CreatedBy = u.DisplayName,
E.CreatedByID,
E.Every,
E.Period,
E.RepeatType,
E.Notify,
E.Approved,
E.Signups,
E.MaxEnrollment,
(Select Sum(NoEnrolees) from {databaseOwner}[{objectQualifier}EventsSignups] WHERE EventID = E.EventID and E.Signups = 1) as Enrolled,
(Select count(*) from {databaseOwner}[{objectQualifier}Events] as E2 WHERE E2.RecurMasterID = E.RecurMasterID and E2.Cancelled = 0 and E2.Approved = 1) as NoOfRecurrences,
(Select max(EventTimeBegin) from {databaseOwner}[{objectQualifier}Events] as E2 WHERE E2.RecurMasterID = E.RecurMasterID and E2.Cancelled = 0 and E2.Approved = 1) as LastRecurrence,
E.EnrollRoleID,
E.EnrollFee,
E.EnrollType,
E.PayPalAccount,
E.Cancelled,
E.DetailPage,
E.DetailNewWin,
E.DetailURL,
E.ImageURL,
E.ImageType,
E.ImageWidth,
E.ImageHeight,
E.ImageDisplay,
E.Location,
c.LocationName,
c.MapURL,
E.Category,
b.CategoryName,
b.Color,
b.FontColor,
E.Reminder,
E.TimezoneOffset,
E.SendReminder,
E.ReminderTime,
E.ReminderTimeMeasurement,
E.ReminderFrom,
E.SearchSubmitted,
E.CustomField1,
E.CustomField2,
E.EnrollListView,
E.DisplayEndDate,
E.AllDayEvent,
E.OwnerID,
OwnerName = O.DisplayName,
E.LastUpdatedAt,
LastUpdatedBy = L.DisplayName,
E.LastUpdatedID,
r.RRULE,
RMOwnerID = r.OwnerID,
E.OriginalDateBegin,
E.NewEventEmailSent
FROM {databaseOwner}[{objectQualifier}Events] E
inner join {databaseOwner}[{objectQualifier}EventsRecurMaster] AS r on E.RecurMasterID = r.RecurMasterID
left outer join {databaseOwner}[{objectQualifier}Users] U on E.CreatedByID = U.UserID
left outer join {databaseOwner}[{objectQualifier}Users] O on E.OwnerID = O.UserID
left outer join {databaseOwner}[{objectQualifier}Users] L on E.LastUpdatedID = L.UserID
left join {databaseOwner}[{objectQualifier}EventsCategory] b on E.Category = b.Category
left join {databaseOwner}[{objectQualifier}EventsLocation] c on E.Location = c.Location
WHERE EventID = @EventID And e.ModuleID = (Select ModuleID from #RealModuleID where EventID = @EventID)
GO