URL: http://www.uburst.com/cgi-bin/dcforum/dcboard.cgi
Forum: uReserve_general
Thread Number: 7
[ Go back to previous page ]

Original Message
"Ureserve and E-mail"

Posted by Brian Avis [brian.avis@searhc.org] on at 04:56 PM
Hello,

We purchased ureserve and so far have really liked it.

What we would like though is to have the system send an e-mail to the people in charge of scheduling everyday to give them a quick briefing on what is going on for the day.

Right now I have a script that that can parse thru the text data files and send an e-mail with what is scheduled. The problem is that when you schedule one resource more than once a day my script ignores all but the first reservation for that resource. Basically because you put all the reservations for that resource on a single line and my script was ready for that.

Thus we come to my question. Could you point me to the section of your perl script that parses out the data (perhaps a quick explanation on how it works) so that I don't have to kill myself trying to find that one part (or re-invent the wheel).

Any help you can provide with this would be much appreciated. Perhaps you can consider something like this for future versions??

Thanks

Brian Avis.
SEARHC
Programmer/Analyst


Table of contents

Messages in this discussion
"RE: Ureserve and E-mail"
Posted by Bill Weiner on at 01:32 PM
Glad to hear the script is working out for you. In regard to sending an email.... that sounds very similar to the email feature that was added to version 2.0:

http://www.uburst.com/uReserve/updates.html

So, if you haven't downloaded the free upgrade yet, you might want to look into doing that.... And if that doesn't result in what you are looking for... then let me know and I will point you to the place in the Perl script where the data is parsed.


"E-mail"
Posted by Brian Avis [brian.avis@searhc.org] on at 12:44 PM
Thanks. We will check it out.

"E-mail"
Posted by Brian Avis [brian.avis@searhc.org] on at 05:31 PM
Okay the way it looks to me is that your e-mail notification sends an e-mail to the admin and the person who made the reservation when the appt. is made.

What we want to do is to be able to send and e-mail to the admin daily. Well actually they want a group of e-mails for some reason (users... go figure).

The admin wants one big e-mail with everything scheduled for that day. As well as individual e-mails each day for each resource scheduled.

For example, they get the main e-mail that says conference room 1 is reserved, conference room 2 is reserved, and the video equipment is reserved for that day.

Then they get further e-mail for conference room 1 saying it is reserved at 12-1 and 1-2:30 and so forth. Then they can take the conference room 1 e-mail and print it out for the day and stick it on the door for the conference room in question so people know if it is reserved (like they can't check on-line.... users... go figure).

Your data files put all the scheduling information for a particular resource on a single line, at least it looks that way to me, so I just wanted to see how you were parsing that data out.

Thanks.


"RE: E-mail"
Posted by Bill Weiner on at 11:57 PM
That's pretty custom all right. So here is some information that may help:

1) An example of how to parse an entire data file can be found in the "sub display_week_graphical" subroutine. In particular, the 7-day loop begins with the line:

for ($day_index = $sday; $day_index < $eday; $day_index++)

(If you would like to see a commented version of that subroutine, send us a support request... with your license number... and I should be able send it to you.)

2) The key to deciphering each line is to use some command like this:

@key_value_pairs = split (/\ZZZ/, $current_line);

(where ZZZ is actuall a vertical bar - or pipe - it's just that this forum doesn't let me Post a pipe symbol).

... Which would basically separate all fields into separate elements in an array, such as:

$key_value_pairs[0] ... The resource name

$key_value_pairs[1] ... Reservation 1 field 1 (user's name by default)
$key_value_pairs[2] ... Reservation 1 field 2 (user's phone number by default)
$key_value_pairs[3] ... Reservation 1 field 3 (user's email by default)
$key_value_pairs[4] ... Reservation 1 field 4 (user's notes by default)
$key_value_pairs[5] ... Reservation 1 field 5 (user's password by default)
$key_value_pairs[6] ... Reservation 1 start time
$key_value_pairs[7] ... Reservation 1 end time

$key_value_pairs[8] ... Reservation 2 field 1 (user's name by default)
$key_value_pairs[9] ... Reservation 2 field 2 (user's phone number by default)
$key_value_pairs[10] ... Reservation 2 field 3 (user's email by default)
$key_value_pairs[11] ... Reservation 2 field 4 (user's notes by default)
$key_value_pairs[12] ... Reservation 2 field 5 (user's password by default)
$key_value_pairs[13] ... Reservation 2 start time
$key_value_pairs[14] ... Reservation 2 end time

$key_value_pairs[15] ... Reservation n field 1 (user's name by default)
$key_value_pairs[16] ... Reservation n field 2 (user's phone number by default)
$key_value_pairs[17] ... Reservation n field 3 (user's email by default)
$key_value_pairs[18] ... Reservation n field 4 (user's notes by default)
$key_value_pairs[19] ... Reservation n field 5 (user's password by default)
$key_value_pairs[20] ... Reservation n start time
$key_value_pairs[21] ... Reservation n end time

Does this info help?


"E-mail"
Posted by Brian Avis [brian.avis@searhc.org] on at 10:59 AM
I will check out that section and see what I can come up with. May take me a while since I am also working on a Corporate service plan project that has priority.


"E-mail"
Posted by Brian Avis [brian.avis@searhc.org] on at 06:39 PM
Hi Bill,

Thanks for the info, I finally got time to get that custom script working.

If you would like a copy of the script or know anyone that needs that type of functionality let me know and I would be happy to e-mail a copy of the script out.

Thanks again.

Brian.


"RE: E-mail"
Posted by Bill Weiner on at 10:18 PM
Great! Glad you got that worked out.

And thanks for the script offer. If we get any requests for similar functionality, I may be contacting you :^)