Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Email notifications #93

Merged
merged 1 commit into from
Jul 23, 2015
Merged

Email notifications #93

merged 1 commit into from
Jul 23, 2015

Conversation

vubo
Copy link
Contributor

@vubo vubo commented Jul 21, 2015

Issue #70

The new function send_notification(days) sends one day or one week shift-notifications to all volunteers who signed up for the shift. This function should be run on the server once a day.

Example data:

v1 = Volunteer(
            first_name="Valeria",
            last_name="Bogdanova",
            address="MyAddress",
            city="MyCity",
            state="MyState",
            country="MyCountry",
            phone_number="2374983247",
            email="vubogdanova@gmail.com",
            user=u1
            )

        v1.save()

        e1 = Event(
                name="GHC 2015",
                start_date="2015-07-22",
                end_date="2015-08-23"
                )

        e1.save()

        j1 = Job(
            name="Volunteer Coordinator",
            start_date="2015-07-22",
            end_date="2015-08-23",
            description="Volunteer Coordinator",
            event=e1
            )

        j1.save()

        s1 = Shift(
            date=date.today() + timedelta(1), #tomorrow date
            start_time="12:00",
            end_time="6:00",
            max_volunteers=4,
            address="Test address",
            city="Atlanta",
            state="Georgia",
            country="USA",
            venue="Near the south entrance",
            job=j1
            )

Notification email example for the data:

Dear Valeria,
thank you for registering for the Volunteer Coordinator job at the GHC 2015 event on 2015-07-22.
The shift you signed up starts tomorrow.

Shift Start Time: 12:00:00
Shift End Time: 06:00:00

Address: Test address
Venue: Near the south entrance
City: Atlanta
State: Georgia
Country: USA

Please correct me if needed.

I also wrote a unit test for this function.

@tapaswenipathak
Copy link
Contributor

@vubo Awesome. 👍

Change the subject to something like
The Systers - VMS notification Volunteer Job Reminder Mail

Change the message body to something like

Dear Valeria,

This is your reminder that you have registered for the Volunteer Coordinator job at the GHC 2015 event on 2015-07-22.
The shift you signed up starts tomorrow.

Shift Start Time: 12:00:00
Shift End Time: 06:00:00

Address: Test address
Venue: Near the south entrance
City: Atlanta
State: Georgia
Country: USA

Thank you for registering!

One more thing is it in the requirements that the this should be run on the server once a day and not at the time when someone registers for the job?

@vubo
Copy link
Contributor Author

vubo commented Jul 22, 2015

@tapasweni-pathak thank you very much, I will correct it!

One more thing is it in the requirements that the this should be run on the server once a day and not at the time when someone registers for the job?

When the shift is on 22.07.2015 and someone registers for this shift on 22.06.2015, we have to schedule a notification sending on the 15.07.2015 (one week) or on the 21.07.2015 (one day). Do I understand correctly? Why does this version is better?

@tapaswenipathak
Copy link
Contributor

Okay. You told me something more. This is great. 👍

But I was asking that are we sending the notification to her immediately at the time when she registers herself for some shift?

@vubo
Copy link
Contributor Author

vubo commented Jul 22, 2015

Do you mean a confirmation email for registration to a shift? No, not yet. But it's a good idea!

@tapaswenipathak
Copy link
Contributor

Yes. Right catch. 👍

But then this is a reminder, no? We are reminding her that you have registered for so and so shift.

@vubo
Copy link
Contributor Author

vubo commented Jul 22, 2015

Yes, here is the issue: #70
We need to remind about a shift all volunteers who signed up.

@tapaswenipathak
Copy link
Contributor

Okay. Then I have changed the message body and subject a bit.

@vubo One more thing, then change the function name to send_reminder instead of send_notification. But if you are gonna use the same for sending confirmation and hence generalizing the function, then this name is fine.

@vubo
Copy link
Contributor Author

vubo commented Jul 22, 2015

Upgrade:

  • Now a volunteer can determine in the profile settings, how many days before a shift she wants to receive a reminder email:
    image
  • Use Validators:
    image
  • New message text:

The Systers - VMS Volunteer Shift Reminder Mail

Dear Valeria,

This is your reminder that you have registered for the Volunteer Coordinator job at the GHC 2015 event on 2015-07-22.
The shift you signed up starts tomorrow.

Shift Start Time: 12:00:00
Shift End Time: 06:00:00

Address: Test address
Venue: Near the south entrance
City: Atlanta
State: Georgia
Country: USA

Thank you for registering!

@tapaswenipathak
Copy link
Contributor

Awesome. 👍

Can you rebase?

@vubo
Copy link
Contributor Author

vubo commented Jul 22, 2015

@tapasweni-pathak ready 👍

@tapaswenipathak
Copy link
Contributor

@vubo Forgot to tell you before, can you change the commit message also.

r/email notifications/Volunteer Shift Reminder Emails

@vubo
Copy link
Contributor Author

vubo commented Jul 22, 2015

@tapasweni-pathak thank you, I did it.

tapaswenipathak added a commit that referenced this pull request Jul 23, 2015
Email notifications (Reminders)
@tapaswenipathak tapaswenipathak merged commit 0492bc4 into anitab-org:develop Jul 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants