phpScheduleIt
May 23, 2013, 10:05:13 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Blackout Broken  (Read 469 times)
jammer
Newbie
*

Karma: 0
Posts: 17


« on: June 25, 2012, 07:50:52 AM »

Hi Nik,

One of my admins put in a blackout from today through 2032 (by accident) and the system effectively put in the blackout but now gives us no option to remove the blackout.  I surmise we could destroy the entire schedule to get rid of it but we really didn't want to do that if it wasn't necessary.  I think its a bug because, if i put in a shorter blackout time period all works as designed.  Otherwise if you have another suggestion to remove the blackout let me know please.

Thanks
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #1 on: June 25, 2012, 01:16:05 PM »

Why can't you delete it?
Logged
jammer
Newbie
*

Karma: 0
Posts: 17


« Reply #2 on: June 26, 2012, 07:13:32 AM »

No option shown to delete.  Nothing, nada.  I can create a normal blackout for (say) a few days to a week and the delete option is shown.  Not for this one.  Nothing shown but the whole calendar is blacked out.
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #3 on: June 26, 2012, 01:09:56 PM »

You should be able to delete it from the manage blackouts admin tool
Logged
jammer
Newbie
*

Karma: 0
Posts: 17


« Reply #4 on: June 27, 2012, 07:00:03 AM »

Sorry, no.  Logged in as admin there is no option showing that this blackout even exists let alone allow it to be deleted.  The only fix I can find is to kill the entire schedule and re-create it.  I was able to reproduce this blackout issue in a test schedule by putting the date from (for example) today until 2032 (random number).  And sure enough the blackout goes into effect I have no way to delete it.
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #5 on: June 27, 2012, 01:31:08 PM »

You'll need to change your filter criteria to have no date range. It will show up then.
Logged
TheoretixSoftwareSolution
Newbie
*

Karma: 0
Posts: 8


« Reply #6 on: August 23, 2012, 05:31:12 PM »

I also found a bug in relation to filtering blackouts by a specific resource.

Had to patch lib/Application/Reservation/BlackoutFilter.php  at  line 60:
   
Code:
60:       $filter->_And(new SqlFilterEquals(new SqlFilterColumn(TableNames::RESOURCES, ColumnNames::RESOURCE_ID), $this->resourceId));

Became:
   
Code:
60:       $filter->_And(new SqlFilterEquals(new SqlFilterColumn('r', ColumnNames::RESOURCE_ID), $this->resourceId));
The problem was that it was trying to do resources.resource_id in a join when the table was aliased to 'r'. There may be a more official way to do this using some constant?
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #7 on: August 27, 2012, 01:43:47 PM »

Thanks. I've fixed this for 2.3
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!