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.

Child issues

Issue Type Icon ESFC-313 Add subscribe/unsubscribe all action to external user activity tab Priority: Medium
Released

Linked issues

relates to
Issue Type Icon ESFJ-220 Allow external users to view recently opened/viewed links Priority: Medium
Withdrawn
Issue Type Icon ESFJ-385 Add external user activity tab in dashboard Priority: High
Released
Issue Type Icon ESFC-285 Add delay to adding activities that are connected with viewing page, add more activity actions Priority: Medium
Released

Activity

Parsa Shiva 5 May 2023, 22:19

@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.

Parsa Shiva 20 March 2023, 18:02

@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.

Parsa Shiva 20 March 2023, 15:22

@Igor Hercer If it needs review please put it to review, if not please set it to “to test“ status. Cheers 🙂

Igor Hercer 20 March 2023, 15:07

@Parsa Shiva I think it’s fixed now.

Kamil Zarychta 17 March 2023, 18:10

@Parsa Shiva @Igor Hercer I need to delete all activity records from QA db to fix problem with environment

Igor Hercer 17 March 2023, 17:46

@Parsa Shiva It may be connected with @Kamil Zarychta fix? Do new activity columns appear as they should?

Parsa Shiva 17 March 2023, 16:23

@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.

Igor Hercer 17 March 2023, 15:36

@Parsa Shiva fixed, deployed on QA

Igor Hercer 17 March 2023, 14:45

@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

Parsa Shiva 17 March 2023, 14:40

@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.

Igor Hercer 16 March 2023, 15:54

@Kamil Zarychta fixed, please take a look

Kamil Zarychta 16 March 2023, 11:39

@Igor Hercer I added comments to review