-
-
Notifications
You must be signed in to change notification settings - Fork 773
Deleting journal entries corrupts summary and profile sprocs #5528
Description
Description of bug
The journal lets you delete entries but this can corrupt the display if you delete multiple items. It only causes a problem if you delete multiple entries in a row, but the problem can result in the appearance of no journal entries rendering except for new posts.
Steps to reproduce
- Go to any valid user profile
- Post to the journal multiple time in a row.
- Delete multiple posts in a row (but try to keep at least one of the oldest posts visible)
- See how the number of row returned by the underlying store procedure gets affected
Current behavior
If you delete multiple posts from the journal the number or rows rendered in the UI begins to diminish.
Expected behavior
A user should be able to delete multiple entries and still see the older posts that are not deleted.
Screenshots
Error information
There is no error.
Additional context
A fix was applied to Journal_ListForGroup in version 09.03.00 but their brethren sprocs(Journal_ListForProfile and Journal_ListForSummary) did not have the same fix applied. Below shows the fixed version that includes the check for IncludeAllItems and IsDeleted data points and is grafted from 09.03.00.
WITH journalItems AS ( SELECT j.JournalId, ROW_NUMBER() OVER (ORDER BY j.JournalId DESC) AS RowNumber FROM {databaseOwner}[{objectQualifier}Journal] as j INNER JOIN @j as jtmp ON jtmp.JournalId = j.JournalId WHERE j.PortalId = @PortalId AND j.ProfileId = @ProfileId AND (((@IncludeAllItems = 0) AND (j.IsDeleted = @IsDeleted)) OR (@IncludeAllItems = 1)) )
Affected version
- [x ] 10.00.00 alpha build
- [x ] 09.11.00 release candidate
- [ x] 09.10.02 release candidate
- [ x] 09.10.01 latest supported release
Affected browser
- [ x] Chrome
- [x ] Firefox
- [x ] Safari
- [ x] Internet Explorer 11
- [x ] Microsoft Edge (Classic)
- [x ] Microsoft Edge Chromium