Querying the table for a user that has not yet logged in using the following format:
SELECT *
FROM "AO_92296B_AORECENTLY_VIEWED"
JOIN user_mapping u ON u.username = 'user_name_here'
ORDER BY "LAST_VIEW_DATE" DESC;
results in an output where the user has supposedly seen all of the pages in our system, with varying dates from 2 months ago until today. How is this possible when the user has never logged in? When checking recently viewed pages for a user when they first log in, nothing shows up - so why does the database say otherwise? Are we querying this table correctly? How does Confluence fetch recently viewed data?
We found this query from the following https://confluence.atlassian.com/confkb/how-can-i-find-which-pages-users-have-recently-viewed-954251927.html
Nice, after spending the majority of the day trying to figure out the answer, we ended up figuring it out after 30 minutes of posting this question. Here's the right query when searching by username:
SELECT *
FROM "AO_92296B_AORECENTLY_VIEWED" rv
JOIN (select user_key from user_mapping WHERE username = 'user_name_here') u ON u.user_key = rv."USER_KEY"
ORDER BY "LAST_VIEW_DATE" DESC;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.