Problem/Motivation

Currently when deleting a digest the data from it (user subscriptions and timestamps) is un touched. This info should be removed.

Also, when updating the schedule to a digest, the timestamp will need to be updated.

Steps to reproduce

Create a digest and have it create a timestamp. Or have a user subscribe to the digest.
Then delete the digest. The data will still be on the site.

Proposed resolution

Override the delete function of the digest to delete all user subscriptions for it and the timestamp.

Add an extra boolean parameter to the set 'send_at' function of the digest that defaults to true.
If this is true, call the 'setNextSendDate' function.

Comments

DerekCresswell created an issue. See original summary.

derekcresswell’s picture

This will be necessary to maintain a clean and consistent data structure. Slated for version 1.0.0.

derekcresswell’s picture

Status: Active » Needs review
StatusFileSize
new3.08 KB

Here I've overridden delete function of the digest to remove subscriptions and state.

derekcresswell’s picture

Status: Needs review » Needs work

And face palm, still needs to add the changing of timestamps when updating. Patch #3 only contains deletion.

derekcresswell’s picture

Status: Needs work » Needs review
StatusFileSize
new4.96 KB

Now when updating digests schedules, there is the option to update the next send date as well.

derekcresswell’s picture

StatusFileSize
new4.82 KB

Removed an excess line from the test that created a timestamp. That bit is internal so doesn't have it's place in the tests.

Status: Needs review » Needs work

The last submitted patch, 6: 3166226-6.patch, failed testing. View results

derekcresswell’s picture

Status: Needs work » Needs review

Setting back to "Needs review".

Test failure is unrelated to this patch. Made a note of this (as it's appeared before) in issue 3166976.

joshmiller’s picture

Status: Needs review » Reviewed & tested by the community

Looks good and reasonable to me.

  • DerekCresswell committed a8a3b3e on 1.0.x
    Issue #3166226 by DerekCresswell: Change timestamp and user data when...
derekcresswell’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.