Skip to content
This repository has been archived by the owner on Oct 31, 2018. It is now read-only.

Multiple reminders - Email & Popup #410

Open
wants to merge 81 commits into
base: master
Choose a base branch
from

Conversation

ElieSauveterre
Copy link

I made a fork from Iridias work (https://github.com/Iridias/calendar) and added/modified the code to implement the following features :

  • Multiple reminder/alarm by event
  • Combobox to choose between email or popup
  • Background job to send email reminders
  • Display popup reminder if you have your browser open on the calendar

@georgehrke
Copy link
Contributor

cool, I'll review asap.

btw, why did you reformat all the code? the code style you use (e.g. spaces instead of tabs) doesn't comply with our coding guidelines

@ElieSauveterre
Copy link
Author

Sorry for the formatting, my IDE do that when I save a file. Is there somewhere I can find those guidelines ?
I found this link (http://owncloud.org/contribute/), but it's not very clear about code formatting.

@ElieSauveterre
Copy link
Author

Ok, but how does that work ?
If my pull request is accepted, I will find my new text on Transifex and then I will have to add the translation directly on Transifex ?

@georgehrke
Copy link
Contributor

@ElieSauveterre please revert all your code reformats and squash the commits

Combobox to choose between email or popup
Background job to send email reminders
Display popup reminder if you have your browser open on the calendar
@ElieSauveterre
Copy link
Author

@georgehrke That should be better now.

georgehrke and others added 7 commits August 8, 2014 21:01
The UI permits downloading a calendar shared with you, but the response
was Forbidden 403 becuase export.php wasn't setting the shared parameter
to true in it's calls to fetch the resource.
Conflicts:
	css/style.css
	js/calendar.js
	js/on-event.js
	l10n/de.php
	l10n/de_AT.php
	l10n/de_CH.php
	l10n/de_DE.php
	l10n/en_GB.php
	l10n/fr.php
	lib/object.php
Raimund Schlüßler and others added 3 commits August 12, 2015 20:30
Overwrite getMultipleChildren to create calendar objects of OC_Connector_Sabre_CalDAV_CalendarObject which return the correct ACL for shared calendars.
@thigg
Copy link

thigg commented Aug 17, 2015

Is this still in active development? Its one of my most needed features.

@ElieSauveterre
Copy link
Author

@thigg Not very active. When I upgrade Owncloud on my server, I also update the plugin to make it work.

@DeepDiver1975 DeepDiver1975 added this to the backlog milestone Oct 13, 2015
@Kwaadpepper
Copy link

Just a suggestion to this if it still in development which i hope, my phone provider allows me to send sms with a webhook http and a query arg for message. eg:
https://phoneprovider/?auth=blah&message=myreminder message

This would be helpful

@ElieSauveterre
Copy link
Author

@Kwaadpepper Great idea. If you want to implement it, you are welcome. These days I don't have the time to work on that.

@Kwaadpepper
Copy link

@ElieSauveterre i'm working slowly on this. I just have a question, is the email event actually working ? I tried to make this work but it just seems that it does not trigger.
I have test the mail function is working using OC 8.1.3 stable. I also saw that OCP\Backgroundjob::registerJob is deprecated. Anyway i need to update the background job to make a curl call but i would like to test the mail function first.

Could you confirm this is still working for the release i mentioned ?

@ElieSauveterre
Copy link
Author

@Kwaadpepper Indeed, the email reminder does not work, I think it's since the last merge I made. Something must have changed regarding how background jobs are working.

@ElieSauveterre
Copy link
Author

@Kwaadpepper Emails reminder should work know. I tested on Owncloud 8.1.1 (stable)

@Kwaadpepper
Copy link

@ElieSauveterre Ok thanks 👍
I also confirm this is working on OC 8.1.3 stable

@Kwaadpepper
Copy link

@ElieSauveterre i just saw that the email format is incorrect, it send html in plain with no boundaries for html actually. I'll look into that as i add webhook feature, also i had to workaround INTERVAL, BETWEEN and UTC_TIMESTAMP() as i use sqlite and it does not support these, i used php functions (gmdate, strtotime) so it works.

@ElieSauveterre
Copy link
Author

@Kwaadpepper I used the function "setPlainBody" for the email body. Maybe it will be better to use "setHtmlBody" and add html tags to the content.

Kwaadpepper and others added 3 commits October 18, 2015 05:39
3rdparty/curl.php       add new handy class to make curl calls
README.md               add optionfield
appinfo/database.xml    add optionfield with length at 1024 since max url is 2000 should be ok
ajax/event/new.php      add $_POST['alarmsOptionField'] to OC_Calendar_Object::addAlarmsDB call
ajax/event/edit.php     add $_POST['alarmsOptionField'] to OC_Calendar_Object::addAlarmsDB call
ajax/event/new.form.php add default for all Alarm Types in initialize default optionfield
js/on-event.js          add .alarmType (select) change event
js/settings.js          add saving methods for default alarm types and default webhook url
js/calendar.js

        add switchAlarmType to show hide optionfield input depending on alarm type
        removes the hidden default alarm since it is send and saved on the DB
            instead base alarm html is written in Calendar.UI.ALARMBASETPL by the template
            and used in addAlarm

templates/calendar.php  add alarm configuration html
templates/part.eventform.php

        add default alarm template (sotes it in Calendar.UI.ALARMBASETPL)
        add Webhook Option
        initialize default optionfield

lib/alarm.php

        made PS2 compliant with phpcs since it make a lot of changes
        add function dispatch to call apropriate function for a given alarm type
            also replaces some sql functions with native php since sqlite does these
        add sendWebhooksAlarm exec WEBHOOK alarms with the new curl class and therefore replaces
            $message in option field with urlencoded text template (same as email plain text)
            this function uses regex to achieve replacement and url parsing
        add sendEmailsAlarm exec EMAIL alarms and send them in html and plain text (added html boundarie)
        add setAlarmSent makes the alarm as sent in database (refactored)
        add genMessage to generate a template (html, text) (refactored)

lib/object.php

        add optionfield in SELECT and INSERT to needed sql queries
        replace some SQL function (DATE_SUB, UTC_TIMESTAMP, INTERVAL) with native php since sqlite does not
            support these
        bind AUDIO to WEBHOOK and vice versa to provide a method to set webhook using CALDAV
            see http://www.ietf.org/rfc/rfc4791.txt 8.6.  Storing and Using Alarms

add ajax/settings/setdefaultalarms.php
add ajax/settings/setwebhookdefaulturl.php
add templates/event.alarm.text.php
appinfo/routes.php      add routes setdefaultalarms and setwebhookdefaulturls
css/style.css           add .webhookUrlEvent and .alarmOptionField style rules
Webhook alarms, Bug fixing and default alarm options
@Kwaadpepper
Copy link

I just noticed a small issue, i use Kontact from plasma5 (Kubuntu/linux).
It let me set AUDIO and script which i believe is PROCEDURE in the CALDAV rfc.

Reminders coming from OC are correct except webhook which is shown as TEXT, that i because it may be sent as invalid from OC (i believe i changed it to AUDIO, but i guess i should have change it to PROCEDURE).

Also reminders set from Kontact are not parsed in OC whereas it should.

Any ideas on this ?

@ElieSauveterre
Copy link
Author

The Sabre library is not very simple to use.
Kontact probably as a different format for the reminder. When I added reminders to the calendar I used Thunderbird as example.

lib/object.php

		Fix CALDAV issue from previous commit
		Now properly bind PROCEDURE to WebHOOK
		muhahahaha !!!!
@Kwaadpepper
Copy link

@ElieSauveterre I just broke something in the last commit.
The new PR solves this and properly bind PROCEDURE to WEBHOOK !

Also i wish i could use Thunderbird, but the moz devs are not likely willing to support other ALARM methods from the CALDAV RFC.
Kontact fully support these and is working, with it i can trigger webhook event on OC with my laptop 💃

@bohni
Copy link

bohni commented Nov 19, 2015

@ElieSauveterre @georgehrke Now that owncloud 8.2.x is out, the original calendar app still does not support reminders.

Will this fork be merged to the official branch in (near) future? Or will the official calendar never support reminders?

@tualatin
Copy link

tualatin commented Dec 2, 2015

I thought, that a former version of owncloud supports notification in the calendar app, but it seems that I'm wrong. Will this feature included in the official calendar app in the near future? It will be very great!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.