Project

General

Profile

Actions

Bug #18865

closed

Issues with Group Library Email Notifcations

Added by Matt Gold 7 months ago. Updated 7 months ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Group Library
Target version:
Start date:
2023-09-18
Due date:
% Done:

0%

Estimated time:
Deployment actions:

git submodule update


Description

Ray, I've been working on a group library for my class tonight, and I noticed a few small issues:

  • I needed to move files not in a folder to a folder. So I clicked on "not in a folder" (which is so great to have) and for each one, chose a folder to put it in. Each time I did this, I inadvertently created a notification. I recommend that the default setting for editing a folder should be no notification
  • the notification that did come had the subject line start with "New file -- [folder name]" -- which seemed a bit odd, as I hadn't added a new file, but merely edited the folder in which an existing file appeared

I'm not sure how closely we can track different kinds of actions on files and the resulting email notifications but I wanted to mention these.

Actions #1

Updated by Raymond Hoh 7 months ago

  • Assignee changed from Raymond Hoh to Boone Gorges

Boone, it looks like the edit_item() method needs to take into account changes to the library item's title and description. If there are no changes to the title or description or if the "Silent Item" checkbox is checked, then we should run the silence_update() routine in the edit_item() method to prevent activity items from recording and subsequently, email notifications from sending. Does that sound about right?

Actions #2

Updated by Boone Gorges 7 months ago

  • Status changed from Assigned to Staged for Production Release
  • Target version set to 2.1.15
  • Deployment actions updated (diff)

Boone, it looks like the edit_item() method needs to take into account changes to the library item's title and description. If there are no changes to the title or description or if the "Silent Item" checkbox is checked, then we should run the silence_update() routine in the edit_item() method to prevent activity items from recording and subsequently, email notifications from sending. Does that sound about right?

No, I think there's a bug in cac-group-library that's causing the silentUpdate param to be ignored when editing (as opposed to creating). The Silent Edit checkbox was, in fact, checked, it was just being ignored. This is fixed in https://github.com/cuny-academic-commons/cac-group-library/commit/bc03be93c8d6574e0287fa2c9cb73442286cc5f0 and will be part of the next release.

the notification that did come had the subject line start with "New file -- [folder name]" -- which seemed a bit odd, as I hadn't added a new file, but merely edited the folder in which an existing file appeared

I see this too. The 'New File' text comes from our customizations at https://github.com/cuny-academic-commons/cac/blob/61ce15a3bafa779063c53e5313f62ba9da54bdf0/wp-content/plugins/cac-bp-custom-includes/email-notifications.php#L297. But this happens because the buddypress-group-documents plugin is generating an activity item with the action 'added_group_document', even in the case of edits. I don't know why this is. IMO it's not worth a lot of debugging at this time, especially since these notifications are silenced by default.

Actions #3

Updated by Boone Gorges 7 months ago

  • Status changed from Staged for Production Release to Resolved
Actions

Also available in: Atom PDF