Closed dpareja2 closed 5 years ago
Hi, "Alert Reservation" is the GLPI notification. You have to use the Plugin notification "User Reservation Expired (plugin)"
In Setup > Notifications > Notifications I search "Reserv" and find 4 notifications:
Name: Alert Reservation, Event: Reservation expired
Name: Delete Reservation, Event: Deletion of a reservation
Name: New Reservation, Event: New reservation
Name: Update Reservation, Event: Update of a reservation
Is that from Reservation 2.1.2 ?
I have GLPI 9.3.3 and Reservation 2.1.1
you have to create it : In Setup > Notifications > Notifications. Click the "+" button to add a notification. Select type "reservation" and event "User Reservation Expired (plugin)"
Got it, I just tested it and I can't get it to work. I believe I have it exactly like "Alert Reservation", should I deactivate it or can they both be active at the same time?
Also, it's on Entity A, visible from Entities A1 and A2 (Sub entities from Entity A), the reservations are being made from Entity A1.
Do you make a notification template for it ? This event works with the automatic action "sendMailLateReservations". Is there some error in log files ?
I forgot about the automatic action, for some reason it was stuck at "Next run: Running" Canceled, forced a run and got an email. It uses the "Alert Reservation" template.
I received this:
Entitat : ##reservation.entity##
--
Automatically generated by GLPI
But it should be like this:
lang.reservation.entity## : ##reservation.entity
FOREACHreservations
lang.reservation.itemtype## : ##reservation.itemtype
lang.reservation.item## : ##reservation.item
reservation.url
ENDFOREACHreservations
So my problem was create the new notification and then fix the automatic action that was stuck.
"Alert Reservation" template does not work for this notification event. Glpi alert reservation takes all the reservations, while plugin notification raise up for each reservation. If you create a new one, you can see all available labels. "##FOREACHreservations##" is not available. Use ##FOREACHitems##
Got it working, thank you so much. I used all the tags available and these didn't work (Got sent as the tag itself ##tag##)
Everything else was replaced correctly.
Should this work? Even if there's only one item?
Oh, I just saw that for reservations with multiple items it sends 1 email for each item. Then what is the ##FOREACHitems## for?
Yes, FOREACHitems is useless because GLPI creates as much reservation as item reserved. So, there is only one item by reservation
Alright, thank you, this can be closed.
v2.1.1 fixed a problem with sendMailLateReservations. Now I see it only sends a notification that the reservation is ending to: Admin, or different profiles (Admin, Hotline, Technician, etc...) but the "Requester" as in the "New Reservation" Notification. It would be good to have the user notified.