Needs review
Project:
Activity Tracker
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Jan 2020 at 16:48 UTC
Updated:
6 Jan 2026 at 18:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
heddnThis tracks by the user performing the update instead of just the node owner.
Comment #3
catchThis seems like a good idea.
Are we able to use the revision author value instead of relying on the current user?
Also we should make the same change in the tracker_cron() logic.
Comment #4
heddnThat ended up being more complicated then I expected to alter the cron implementation. This uses db merge a lot more often because we need to load all revisions and process them one by one. And its possible that one of the revisions could have been written by another author or be a comment by another author that already is recorded in the tracker system.
Comment #5
xjmEven though this is a bugfix, I think it's a minor-only change, since it's changing the behavior of the module. So, moving to 9.1.x-dev. Thanks!
Comment #6
kristen polTested the changes for tracker_node_update as follows but not the cron code since I'm not sure how to test the cron code:
1) Enable Activity Tracker module
2) Create additional user account (username=hello)
3) Add Article content with author of hello
4) Check /user/[new user id]/activity and only relevant "hello" activity should show up
5) Add Article content with author of user 1
6) Check /user/1/activity and only relevant user 1 activity should show up
7) Update user 1's content by user 1
8) Update hello's content by user 1
9) Check /user/1/activity and only relevant user 1 activity should show up
10) Check /user/[new user id]/activity and only relevant "hello" activity should show up
While it works as expected, the table shows "Last updated" which is technically correct though maybe it would make sense to show "Last updated by me" since that might more relevant but it really depends on what the user is looking for.
Without patch:
With patch:
Comment #7
kristen polFixing one of the screenshots.
Comment #8
kristen polAdding tag as I worked on this yesterday for the Bug Smash Initiative.
Also, if someone can provide notes/steps for testing the cron, that would be great.
Comment #9
jibranLet's add some tests here.
Comment #10
kristen polBack to "Needs work" for tests.
Comment #12
mohit_aghera commentedUploading test to evaluate scenarios mentioned above.
Comment #13
mohit_aghera commentedComment #14
pragati_kanade commentedI have tested this patch. Patch is not applying correctly. Need to re-roll it.
Comment #15
suresh prabhu parkala commentedRe-rolled patch. Please review.
Comment #17
mohit_aghera commented- Fixing the issue in re-roll which was causing test-case failures.
In comment #12,
_tracker_add($node->id(), $node->getRevisionUserId(), $node->getChangedTime());snippet was intracker_node_updatehook.- Remove deprecated functions from test cases.
Comment #19
kristen polThanks for the update. I'm confused on this part:
Wouldn't it be better to be something like this?
i.e. reuse
$updated_title?Comment #20
mohit_aghera commented@Kristen Pol, thanks for the heads up!!
It was surely a miss. Fixed it.
Comment #21
kristen polThanks for the update. The interdiff change looks good. Some thoughts :)
1) Next time, it would be good to have a test only patch added first, so we see it fails without the fix.
2) Don't we also need a test for the cron?
3) I'm not sure how to manually test the cron.
Comment #25
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #26
catchTracker is deprecated for removal in Drupal 11, this issue can be moved to the contributed module once the Drupal 11 branch is open.
Comment #28
andypostComment #29
brad.bulger commentedI am applying the patch in #20 to this contrib version of tracker, it works without issue.
Comment #32
batigolixI created a MR from the patch
Comment #33
batigolix