This is a snapshot of Indico's old Trac site. Any information contained herein is most probably outdated. Access our new GitHub site here.

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#1170 closed defect (fixed)

Show all protected rooms in red color

Reported by: jbenito Owned by: jatrzask
Priority: normal Milestone: v1.0
Component: Room Booking Version: 0.99
Keywords: Cc:

Description

Right now, only the rooms which are not public (isReservable = False) are showing red.

On the other hand, there is a situation that the room can be public (isReservable = True) but it may have also a value in Booking Simba List. This means that the room is only bookable by the members of that list, and so, the room should be also printed in red color.

Take the opportunity to check if we can make the colors work in browsers like Safari, etc.

Change History (11)

comment:1 Changed 3 years ago by jbenito

  • Status changed from new to assigned

comment:2 Changed 3 years ago by jatrzask

  • Status changed from assigned to in_work

comment:3 Changed 3 years ago by jatrzask

  • Status changed from in_work to awaiting_merge

Take the opportunity to check if we can make the colors work in browsers like Safari

It is not so easy because Safari drop down menu layout is system specified and can not be overwritten using CSS styles.

comment:4 Changed 3 years ago by jatrzask

Do not forget to run DB migration script:

from MaKaC.rb_room import RoomBase
from MaKaC.plugins.RoomBooking.CERN.dalManagerCERN import DALManagerCERN

DALManagerCERN.connect()

for room in RoomBase.getRooms():
    oldReservable = room.isReservable
    room.isReservable = bool(room.isReservable and not room.customAtts.get('Simba List'))
    if oldReservable != room.isReservable:
        print '------------------------'
        print 'room id: ' + str(room.id)
        print 'room Simba List: ' + str(room.customAtts.get('Simba List'))
        print 'old isReservable: ' + str(oldReservable)
        print 'new isReservable: ' + str(room.isReservable)

DALManagerCERN.commit()
DALManagerCERN.disconnect()

comment:5 Changed 3 years ago by jbenito

  • Status changed from awaiting_merge to infoneeded

Kuba, is it necessary? I would prefer not to modify the value 'isReservable', because it's a value that comes from GesLoc? and it should stay sync with it.
Is there a reason for doing it this way? can we discuss it?

In case we keep it like that, migration scripts always go to --> migrate.py

comment:6 Changed 3 years ago by jatrzask

  • Status changed from infoneeded to assigned

comment:7 Changed 3 years ago by jatrzask

  • Status changed from assigned to in_work

comment:8 Changed 3 years ago by jatrzask

  • Status changed from in_work to awaiting_merge

Migration script is not needed any more.

comment:9 Changed 3 years ago by Jakub Trzaskoma <jakub.piotr.trzaskoma@…>

  • Resolution set to fixed
  • Status changed from awaiting_merge to closed

In ec46d1faedd7591ca258b3a57c72072a62857ca5/indico:

[FIX] Small PEP8 fixes

  • Do not forget to run room DB upgrade script!
  • Closes #1170

comment:10 Changed 3 years ago by Jakub Trzaskoma <jakub.piotr.trzaskoma@…>

In a4203bbdd3dab5ab99b07ae790721659d5c028a9/indico:

[FIX] Do not change room.isReservable DB filed

  • Removed unused Room Map fossile
  • Closes #1170

comment:11 Changed 3 years ago by Pedro Ferreira <jose.pedro.ferreira@…>

In 810aadd5b5c5fe8ddfae0ef61ede6cd9e16058bf/indico:

[FIX] Keep behavior of isReservable intact

Note: See TracTickets for help on using tickets.