Allow external users to view recently opened/viewed links
Description
Add the ability for external users to view shared links history from external share account.
Current build
If an external share is accessed using a link and not shared with specific external user, external user may only view this page again if the user subscribes to the share; otherwise user must find the link in order to access the share.
Future build
There is an option for external user to view history of viewed links, for example as,
- History
- Recently viewed
Database design
Table: external_user_activity
We could use it to save information about all action types:
Added attachments, added comments, subscribe/unsubscribe actions
column name | column type | opts |
---|---|---|
id | bigserial | autincrement |
external_user_id | int | required |
activity_type | External_User_Activity_Type | required |
share_id | bigint | required |
create_date | timestamp_with_timezone | required |
title | string | Confluence page name |
page_id | int | required |
External_User_Activity_Type:
Page View, Attachement Add, Comment Add, Comment Remove, Comment Update. Subscribe, Unsubscribe.
@Igor Hercer
- changelog.xml → change set → add table
- JOOQ - generate
- collect page view data → nerby
increaseOpen
Create Dao → insert, list
Create service → dao
- add dashboard tab
- render recent activity (based on subscription / shared-with-me)
Create Controller → service-list activity - Pagination
// Example enum type
<sql>
CREATE TYPE document_email_status AS ENUM ('SEND', 'DELIVERED', 'ERROR');
--rollback DROP TYPE document_email_status;
</sql>
service.increaseOpen(share);
externalUserService.collectActivity(ExternalUserActivityType.PAGE_VIEW,
shareId,
content.id(),
spc.user().id()
)
AFTER: Make activity not clickable if share was deleted.
@Igor Hercer I think there might be some regression issues on this, I cannot see changes on child pages, it returns activities on the parent page instead.
@Igor Hercer
Fix verified - Improvement implemented - QA environment.
Small suggestion, would be good to have a loading animation when user clicks on a link from this list, at time it takes a long while due to some performance issue and it appears as if the links are not working.
@Igor Hercer If it needs review please put it to review, if not please set it to “to test“ status. Cheers
@Parsa Shiva I think it’s fixed now. :)
@Parsa Shiva @Igor Hercer I need to delete all activity records from QA db to fix problem with environment
@Parsa Shiva It may be connected with @Kamil Zarychta fix? Do new activity columns appear as they should?
@Igor Hercer
Something strange is happening, my activities are lot smaller I think?!
I have over 10 pages, now only 1 and some of the pages I supposedly visited is called “Przegląd”.
What is super weird that this is happening for 2 of my accounts that should have a different history.
@Parsa Shiva fixed, deployed on QA:)
@Parsa Shiva Sorry, I’ve fixed that but there is a problem with deployment, I’ll let u know as soon as it’ll appear on QA:)
@Igor Hercer
Pages are displayed, but could you sort it in a way that the last visited pages are displayed on the first page and on the top?
Currently the oldest ones are first and the latest ones are added to the end.
@Kamil Zarychta fixed, please take a look:)
@Igor Hercer I added comments to review