Jump to content

Recommended Posts

Posted

Hi Nick

 

Ive not upgraded to 7.10 yet - so apologies if youve fixed this already...

 

Im trying to use the Advanced Booking Rights to extend the booking window for some staff. Ive entered their username, and changed the setting so that is is 10 weeks in advance - but it isnt setting it (the dates show greyed out still). It soes seemt to set the max bookings per week successfully though.

 

Any ideas?

 

Stuart

Posted

And another discrepancy surrounding rights on bookings...

 

Ive now upgraded to v7.10... and these are the issues I've spotted:

 

1. Advanced Booking Rights - Max number of bookings per weeks is applied, but number of weeks in advance isn't

2. Additional Admins of a Room/Resource get the "over-ride" option on bookings, but they cannot book on behalf of someone else.

 

Upgrade otherwise works nicely Nick. Great work. Still got that other bug with MyFiles not displaying and throwing that error as per other thread....

Posted

And a bit more digging on it. If I remove the users from the "Additional admins" on the Room/Resource - it doesn't look like it is reading the group membership of the AD group added on the HAP Config screen under Bookings > Administrators.

 

Any troubleshooting ideas as this one is a major PITA!

 

Stuart

Posted

Ok, I think I've fixed both of these bugs, any chance you can test the attached dll.

 

The 1st, I've added a loop that checks each week, and then adds any addition days.

 

The 2nd, was only looking for usernames, not AD Groups, it now does both

Posted

Hi Nick. Ok - Ive replaced the DLL and restarted IIS. Sadly - no change.

 

The user is listed as an additional admin on the HAP Config page, but doesnt get the ability to book on behalf of someone else. They can remove/override others though - so some parts of the additional admin are working. Ive given the user Advanced Permissions from the Bookings Control panel - and the number of bookings for the week sets correctly now, but the number of days in advance doesnt.

Posted

very odd, the Advanced Rights work for me (for some reason it's -1 week from what is actually set (though that could because it's Monday))

 

The admin rights also works, where the user can book as another user

Posted

Ok - Ive found one sort of fix. The username needed to be entered as DOMAIN\Username in the Advanced Permissions. Setting as a Room Admin (via HAP config generated the ability to remove and override booking; adding the user to the group defined at the top of the booking section gave the "As another user" option.

 

So, Ive used a combo approach on that - and it is working ok now.

 

Ive got a feature request on bookings - which I will put in the right area too; but as its related to bookings - I'll stick it here too!

 

The ability to book a whole day rather than go for each session would be great. Kind of an option to copy to remainder of the day or something like that.

 

Hope you can do it...

 

Stuart

Posted

Im using Windows Auth - as Im one of your awkward ISA/TMG users. I will try taking it out just to confirm, but thats the change that seemed to make it work. What do you think of the feature request?

 

Great work as always, thanks

 

Stuart

Posted

Hmmm.... there is still a discrepancy here somewhere! Im trying to find it...

 

Ok... heres the scenario...

 

In the HAP Config screen - Booking System - Administrators group selected as Staff-BookingsAdmin (thats our AD group that contains the higher level users)

 

This correctly gives them the "book as someone else" option. It does not however over-ride the max days (cant tell if over-rides max bookings - but the info bar doesnt contain the entry "You have x bookings remaining this week").

 

So, go to Advanced permissions to add this as DOMAIN\username, which works - so long as its not during a holiday (but it is now - which throws a lovely error... shown at the end).

 

Can you set it so that being in the extra admin group correctly handles max bookings and bookings in advance (no limit) as it does on Domain Admins; or can we bug fix that new dll?

 

Oh... and I went back to that dll, which doesnt produce the error below - but then we are back to the max bookings limit again!

 

The added or subtracted value results in an un-representable DateTime.

Parameter name: value

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

 

Exception Details: System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime.

Parameter name: value

 

Source Error:

 

 

Line 86:

Line 87: var curdate, curres, curles;

Line 88: var user = { <%=JSUser %> };

Line 89: var resources = <%=JSResources %>;

Line 90: var availbookings = [ 0, 0 ];

 

 

Source File: d:\Program Files\HAP7\BookingSystem\Default.aspx Line: 88

 

Stack Trace:

 

 

[ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime.

Parameter name: value]

System.DateTime.AddTicks(Int64 value) +9624435

System.DateTime.Add(Double value, Int32 scale) +136

HAP.Web.BookingSystem._new.get_JSUser() +3055

ASP.bookingsystem_default_aspx.__Render__control13(HtmlTextWriter __w, Control parameterContainer) in d:\Program Files\HAP7\BookingSystem\Default.aspx:88

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109

System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8

System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +31

HAP.Web.Controls.CompressJS.Render(HtmlTextWriter writer) +4

System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27

System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100

System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25

ASP.bookingsystem_default_aspx.__Render__control3(HtmlTextWriter __w, Control parameterContainer) in d:\Program Files\HAP7\BookingSystem\Default.aspx:82

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109

System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8

System.Web.UI.Control.Render(HtmlTextWriter writer) +10

System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27

System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100

System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208

System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +173

System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +31

System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53

System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27

System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100

System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208

System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8

System.Web.UI.Control.Render(HtmlTextWriter writer) +10

System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27

System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100

System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208

System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8

System.Web.UI.Page.Render(HtmlTextWriter writer) +29

System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27

System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100

System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060

 

 

 

 

--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

Posted
Extrra debug information - so long as the information i put in the for max weeks in advance is a single digit (ie up to 9) - then it works. Go to 10 - then the error appears.
Posted

Just checked a code release into codeplex which may fix some of the issues you've addressed here, the date not moving to the next free day during a holiday was starting to annoy me, found out why it wasn't working, it is now.

 

Can you try the attached dlls, they should enable correct line references for me to debug.

Posted (edited)

Ok... going to be a few separate posts here...

 

Scenario 1: User has ABR's set - below 10 and over 10 days in advance (and is not a Booking Admin) results in the following

 

Server Error in '/HAP7' Application.

--------------------------------------------------------------------------------

 

The added or subtracted value results in an un-representable DateTime.

Parameter name: value

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

 

Exception Details: System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime.

Parameter name: value

 

Source Error:

 

 

Line 86:

Line 87: var curdate, curres, curles;

Line 88: var user = { <%=JSUser %> };

Line 89: var resources = <%=JSResources %>;

Line 90: var availbookings = [ 0, 0 ];

 

 

Source File: d:\Program Files\HAP7\BookingSystem\Default.aspx Line: 88

 

 

[ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime.

Parameter name: value]

System.DateTime.AddTicks(Int64 value) +9624435

System.DateTime.Add(Double value, Int32 scale) +136

HAP.Web.BookingSystem._new.get_JSUser() in H:\Documents\Visual Studio 2010\Projects\CHS Extranet\HAP.Web\BookingSystem\Default.aspx.cs:174

ASP.bookingsystem_default_aspx.__Render__control13(HtmlTextWriter __w, Control parameterContainer) in d:\Program Files\HAP7\BookingSystem\Default.aspx:88

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109

System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8

System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +31

HAP.Web.Controls.CompressJS.Render(HtmlTextWriter writer) in H:\Documents\Visual Studio 2010\Projects\CHS Extranet\HAP.Web\Controls\CompressJS.cs:29

System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27

System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100

System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25

ASP.bookingsystem_default_aspx.__Render__control3(HtmlTextWriter __w, Control parameterContainer) in d:\Program Files\HAP7\BookingSystem\Default.aspx:82

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109

System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8

System.Web.UI.Control.Render(HtmlTextWriter writer) +10

System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27

System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100

System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208

System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +173

System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +31

System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53

System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27

System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100

System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208

System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8

System.Web.UI.Control.Render(HtmlTextWriter writer) +10

System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27

System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100

System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208

System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8

System.Web.UI.Page.Render(HtmlTextWriter writer) +29

System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27

System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100

System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060

Edited by TheScarfedOne
Extra useful code spotted...
Posted

And Scenario 2, the user is put in an AD group - this group is selected in HAP Config:

 

User gets the "Control Panel" option shown, can override bookings, and book on behalf of others - but the date selector will not allow going beyond the system default still.

Posted (edited)

RIGHT..... some bug testing on Scenario 1....

 

System default for max days in advance is 18 days.

Set ABR to increments of 1 week to find the point where the error is thrown.

 

Thrown at week 8 from today. Week 8 coincides with a holiday (June HT). So... it looks like it might be connected to when the system sees ABR overlapping into a holiday? But still doesn't answer why Overall admin rights given through HAP Config result in all permissions except no days in advance... hmmmm

 

And I saw your "Week 9" post too late... but hopefully the above helps outline whats happening...

 

ABR = 9 also still generates the error. So it looks like it is to do with how ABR sees holidays as you suspected. :(

Edited by TheScarfedOne
Updated based on your post which I saw too late!
Posted
Not at this moment in time, had an hour to spare today and did the basis of the live tiles, this is going to be a bit more work, hopefully this weekend.
Posted

Yep - youve cracked both my bugs at once. There is one more bit to test... making sure that if it is currently a holiday, that it still works. will know that in a few weeks time.

 

Cheers - great work!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...