Kallithea feature: notifications: anyone using it?
Long Vu
long.vu at intelerad.com
Tue Sep 18 21:24:29 UTC 2018
I personally never used the "user tab top-right > 'Notifications'" page.
All the notifs in there are already sent by email anyways.
That notification page would have been useful if it auto clear itself
once the PR is closed. Then if I ever decide to filter all the
notification mails to trash, I can rely on that page for "pending
review".
But as it stands, since that page does not auto clear itself of
notification on already closed PR, it's just another manual clean up
to do.
On Tue, Sep 18, 2018 at 3:18 PM, Thomas De Schampheleire
<patrickdepinguin at gmail.com> wrote:
> Hi,
>
> Kallithea has a Notifications feature, where you can get a list of
> notifications, like:
> '<user> commented on pull request'
> '<user> created pull request'
> '<user> commented on changeset'
> etc.
>
> The page is reachable via the user tab top-right > 'Notifications'.
> When you click on a notification, you get some more detail, a
> hyperlinked subject (to e.g. the comment or PR in question), and the
> body of the notification, e.g. the comment itself.
>
> Personally I have never used this feature for real.
> Does anyone actually use it and finds it useful?
>
> Reason why I was looking into this: when creating a notification
> (which will also trigger the email sending), a subject is determined,
> and that subject is solely used for the aforementioned notification
> page. The subject used in emails is completely different.
> The 'subject' field of the notifications table in the database is 512
> characters long. As this field contains a hyperlink, it could become
> quite long if the title of the PR on which a comment is given is very
> long. I have observed a psycopg2 database error in such a scenario.
>
> To get rid of the two different subjects, I refactored the code as
> below, but then there is no hyperlink to the comment or PR anymore.
>
> diff --git a/kallithea/model/notification.py b/kallithea/model/notification.py
> --- a/kallithea/model/notification.py
> +++ b/kallithea/model/notification.py
> @@ -89,6 +89,9 @@ class NotificationModel(object):
> )
> #else: silently skip notification mails?
>
> + subject = EmailNotificationModel() \
> + .get_email_description(type_, **email_kwargs)
> +
> # TODO: inform user who are notified
> notif = Notification.create(
> created_by=created_by_obj, subject=subject,
> @@ -120,8 +123,6 @@ class NotificationModel(object):
>
> html_kwargs.update(email_kwargs)
> txt_kwargs.update(email_kwargs)
> - email_subject = EmailNotificationModel() \
> - .get_email_description(type_, **txt_kwargs)
> email_txt_body = EmailNotificationModel() \
> .get_email_tmpl(type_, 'txt', **txt_kwargs)
> email_html_body = EmailNotificationModel() \
> @@ -132,7 +133,7 @@ class NotificationModel(object):
>
> # send email with notification to all other participants
> for rec in rec_objs:
> - tasks.send_email([rec.email], email_subject, email_txt_body,
> + tasks.send_email([rec.email], subject, email_txt_body,
> email_html_body, headers, author=created_by_obj)
>
> return notif
>
> If however, the entire notifications feature is found not useful by
> users, then we can get rid of it entirely.
>
> Thanks,
> Thomas
> _______________________________________________
> kallithea-general mailing list
> kallithea-general at sfconservancy.org
> https://lists.sfconservancy.org/mailman/listinfo/kallithea-general
--
Long Vu | Software Developer, Tools & Infrastructure | Intelerad |
+1-514-931-6222 ext. 7743
--
This email or any attachments may contain confidential or legally
privileged information intended for the sole use of the addressees. Any
use, redistribution, disclosure, or reproduction of this information,
except as intended, is prohibited. If you received this email in error,
please notify the sender and remove all copies of the message, including
any attachments.
More information about the kallithea-general
mailing list