Implemented article status update message #183
No reviewers
Labels
No labels
Component: User interface
Component: Wymeditor
Help wanted
Level: Difficult
Level: Easy
Level: Moderate
Pagetype: Festival
Pagetype: Mailinglist
Pagetype: Peer reviewed article
Pagetype: Text
Privacy GDPR AVG
status: has conflicts
Status: Needs changes
Status: Needs discussion
Status: Needs review
Status: Ready to merge
Status: Waiting for response
Type: Bug
Type: Enhancement
Type: Question
Usecase: De Stadsbron
Usecase: Koppelting
Usecase: MeetjeStad
Value: Coders
Value: Security
Value: Users
Value: Visitors
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
harmen/hypha!183
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "user_feedback"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This looks very good, it much improves the feedback and the code is a lot cleaner than the old code that hardcoded the links to be added to the messages.
I added one nitpick comment, which is not really essential to fix.
Also, the commit message "Implemented article status update message" seems off - the notification message was already sent, but this commit only improves its content.
Finally, this PR is based on an older master version, so it should be updated (rebased) on top of the current master (e.g.
git fetchand thengit rebase origin/master). This will likely produce a conflict that must be resolved, due to changes in the language files.This string has a trailing space.
I did a bit more testing of this and noted that when you post a review comment, a notification is sent without a commenter name (e.g. "Test: New comment by to 'Testarticle2'"). Turns out that the notification code assumed that a comment has a 'name' attribute, but review comments only have a 'user' attribute with a userid that must be looked up.
I made a stab at a fix, here (just a branch, no PR yet): https://github.com/PlanBCode/hypha/commits/comment-mail-wip
However, reading into the code more, it actually seemed a bit weird that this notification was sent at all. Currently, adding a new comment (review or visitor) both triggers an
EVENT_PUBLIC_COMMENTevent, which callsonPublicComment()which either sends a confirmation mail (when posted by a visitor), or callssendNewCommentMessage()(when posted by a user).I wonder if all this is how it was intended?
EVENT_PUBLIC_COMMENTsuggests to me "visitor comment", but apparently it is called for review comments too. This does not actually seem necessary (since review comments are always posted by users and never need confirmation), but that might change in the future? In any case, the current code (with this PR merged) will send out a (currently broken, as above) notification for every review comment, and a second notification mail for new blocking discussions (so you get two mails for a single comment in that case).@giplt, did you intend to send notifications for all review comments? Or did you want to keep the old behaviour of sending a notification for new blocking discussions only and add notifications for all visitor comments only?
The issue noted above is fixed by #192.
I noticed another issue, see https://github.com/PlanBCode/hypha/issues/99#issuecomment-455312177
I just left a comment on test but do not get an email.
Apparently I didn't fully grasp the stream of events that is implemented in the article module, which seems more convoluted than I imagined. Actually I'm not so sure now where and how to implement this. Feels like the more fundamental discussion on a preferred programming paradigm needs to take place first. How do we want the datatype modules to be organised: structured, data/event-driven, other, mixed?