You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2008-03-06 20:19:38

icontender
Member
Registered: 2008-03-06
Posts: 4

make lots of computers reservable

How can I make 50 computers reservable at once without clicking on each one individually to activate that feature?

Offline

#2 2008-03-07 18:55:51

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: make lots of computers reservable

it is not possible now


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#3 2008-03-07 19:37:35

icontender
Member
Registered: 2008-03-06
Posts: 4

Re: make lots of computers reservable

what sql would I need to update to make one reservable.  I could just make a script for myself to update the rest of the systems with a for loop.


thanks,

Offline

#4 2008-03-07 19:44:18

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: make lots of computers reservable

you need to insert datas in glpi_reservation_item


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#5 2008-03-14 18:45:24

icontender
Member
Registered: 2008-03-06
Posts: 4

Re: make lots of computers reservable

I ended up doing the following.  First I noted the device_id.  Then I added them one by one using sql commands.  Much faster than through the gui.

The only problem I see is that sometimes I entered duplicates and had to delete a row.  Maybe someone can alter my sql command to only insert unique IDs. 





mysql> select * from glpi_reservation_item;
+----+-------------+-----------+----------+--------+
| ID | device_type | id_device | comments | active |
+----+-------------+-----------+----------+--------+
|  1 |           1 |       129 | NULL     |      1 |
|  2 |           1 |        35 | NULL     |      1 |
|  3 |           1 |        28 | NULL     |      1 |
|  4 |           1 |        96 | NULL     |      1 |
|  5 |           1 |        97 | NULL     |      1 |
|  6 |           1 |        32 | NULL     |      1 |
|  7 |           1 |        13 | NULL     |      1 |
|  8 |           1 |        21 | NULL     |      1 |
|  9 |           1 |        30 | NULL     |      1 |
| 10 |           1 |        31 | NULL     |      1 |
| 15 |           1 |         1 | NULL     |      1 |
| 12 |           1 |        33 | NULL     |      1 |
| 13 |           1 |        34 | NULL     |      1 |
| 16 |           1 |         9 | NULL     |      1 |
| 17 |           1 |        10 | NULL     |      1 |
| 18 |           1 |        11 | NULL     |      1 |
| 19 |           1 |        13 | NULL     |      1 |
| 20 |           1 |        29 | NULL     |      1 |
| 21 |           1 |        61 | NULL     |      1 |
| 22 |           1 |        95 | NULL     |      1 |
| 24 |           6 |         1 | NULL     |      1 |
+----+-------------+-----------+----------+--------+
21 rows in set (0.01 sec)

mysql> insert into glpi_reservation_item (device_type, id_device, active) values(1,3,1);
Query OK, 1 row affected (0.02 sec)

Offline

Board footer

Powered by FluxBB