Bug 1553780

Summary: notifications do not get cleared from the notification table
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ApplianceAssignee: Nick LaMuro <nlamuro>
Status: CLOSED ERRATA QA Contact: Shveta <sshveta>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.8.0CC: abellott, cpelland, dmetzger, fdewaley, nlamuro, obarenbo, sshveta
Target Milestone: GAKeywords: ZStream
Target Release: 5.9.2   
Hardware: All   
OS: All   
Whiteboard: notification
Fixed In Version: 5.9.2.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1544890 Environment:
Last Closed: 2018-05-07 20:45:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1544890    
Bug Blocks:    

Comment 2 CFME Bot 2018-03-09 14:32:51 UTC
New commits detected on ManageIQ/manageiq/gaprindashvili:

https://github.com/ManageIQ/manageiq/commit/920e709435e62754456237d03974730d0d0f9228
commit 920e709435e62754456237d03974730d0d0f9228
Author:     Joe Rafaniello <jrafanie.github.com>
AuthorDate: Thu Mar  8 15:33:38 2018 -0500
Commit:     Joe Rafaniello <jrafanie.github.com>
CommitDate: Thu Mar  8 15:33:38 2018 -0500

    Merge pull request #17046 from NickLaMuro/notification-purging

    Adds purging for notifications
    (cherry picked from commit 427257a185aed602d1596dfb81c623254957fbe6)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553780

 app/models/miq_schedule_worker/jobs.rb | 4 +
 app/models/miq_schedule_worker/runner.rb | 5 +
 app/models/notification.rb | 2 +
 app/models/notification/purging.rb | 24 +
 config/settings.yml | 5 +
 spec/models/notification/purging_spec.rb | 40 +
 6 files changed, 80 insertions(+)

Comment 5 Shveta 2018-04-03 15:53:44 UTC
yes thanks Nick.
I changed the created_at and updated_at time in the notifications table to last month and it will get purged now right ?
Waiting for it to get purged . Will verify the BZ then.

Comment 6 Nick LaMuro 2018-04-03 15:59:21 UTC
> I changed the created_at and updated_at time in the notifications table to last month and it will get purged now right ?

Yup, that is correct, though the job for it only runs once a day, so depending one when the last one was scheduled to run it might take up to a day for the purge job to run.

Comment 7 Shveta 2018-04-04 05:20:12 UTC
Fixed in 5.9.2.0.20180320210136_355c506

Comment 10 errata-xmlrpc 2018-05-07 20:45:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:1328