importing comments: wrong name to display and content

Bug #1897199 reported by Cecilia Vela Gurovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
20.10
Fix Released
Medium
Cecilia Vela Gurovic

Bug Description

When exporting from a site and importing to a different site, there is no consent of the author of a comment in this other site to display their name. We should be replacing the name for something like 'Imported feedback'.

IMPORTANT: Since the .xml text can be easily edited, it's best not to check if the username already exists on the system. So no names or ids are exported or imported for comments or peer assessments.

The comment contents are not display correctly. The text is replaced by the string "Comment" like is shown in the attached image.

Cases to take into consideration when testing:

Comment export + import testing

Export
 1. Full account
 2. Single page
 3. Collection (should be the same)
 4. Bulk

Comments needed:
 1. Public on page
 2. Private on page
 3. Public on artefact, i.e. journal entry so we don't need site data
 4. Private on artefact

Import
 1. Interactive, i.e. own account
 2. Admin menu ->People->Add person
 3. Bulk

Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :
Changed in mahara:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 20.10rc2
Changed in mahara:
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/11309

Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :
Download full text (3.5 KiB)

Instructions for testing:

- Need to checkout the patch before starting to work since I made changes on the export and the import as well.

- The attached DB:
    The db contains 6 users:
    admin
    user00001
    user00002
    user00003
    user00004
    user00005

    all passwords are 'mahara'

    The only one that has portfolios id user00001
    It has a page PageA that contains
    A. 4 comments:
     - a public comment and a private comment from user00002
     - a public comment and a private comment from user00003
    B. an assessment block that contains:
      - a public assessment and a draft assessment from user00002
      - a public assessment and a draft assessment from user00003
    It also has a collection CollectionA that contains PageA

- Using this DB, there three steps to follow to test the peer assessment import and the comments import

    * Export: create the Leap2A export files that will be used to test the import
    - Login as admin
    - go to admin/users/bulkexport.php
    - select Leap2A as the export format, set user00001 as username to export
    - click Export accounts
    - save the 'Leap2A account' export

    - login as user00001
    - go to Main menu -> Manage -> Export
    - select 'All my data'
    - Generate export
    - save the 'all my data' export

    - click 'Continue'
    - select 'Just some of my pages'
    - select PageA
    - Generate export
    - save the 'PageA' export

    - click 'Continue'
    - select 'Just some of my collections'
    - select CollectionA
    - Generate export
    - save the 'CollectionA' export

    * Remove user00001 and user00002 from the site

    - login as admin
    - go to Admin menu-> People -> People search
    - click on user00001
    - suspend or delete account
    - delete account
    - go to Admin menu-> People -> People search
    - click on user00002
    - suspend or delete account
    - delete account

    * Import: test the leap2A files created on first export step

    - login as user00004
    - go to Main menu -> Manage -> Import
    - Browse and select 'pageA export'
    - Check all data is fine in PageA

    - go to Main menu -> Manage -> Import
    - Browse and select 'pageA export'
    - Check all data is fine in PageA inside CollectionA

    - login as admin
    - Admin menu -> People -> Add person
    - on 'Creation method' check 'Upload Leap2A file' and browse for 'All my data' export
    - set username= user00001 password= qweQWE123!@# and create account
    - login as user00001
    - check pageA from collectionA has correct information

    - login as admin and delete user00001
    - go to admin/users/bulkimport.php
    - set 'Bulk export file' to the 'account export' location
    if the file it's in tmp folder and it's called 'account_export.zip' write
    /tmp/account_export.zip
    - click 'Import'
    - login as user00001 and check PageA has correct information

- To check if PageA has correct information
    For peer assessment
    - there should be only 2 peer assessments. These are the public ones. The draft should not be displayed
    - the authors of the peer assessments should not be displayed and they should not link to any...

Read more...

description: updated
Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :

It's best to test together with https://bugs.launchpad.net/mahara/+bug/1803101

description: updated
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/11309
Committed: https://git.mahara.org/mahara/mahara/commit/2b2348e3430f1e6d3aad0b126098f1df697ddd59
Submitter: Lisa Seeto (<email address hidden>)
Branch: master

commit 2b2348e3430f1e6d3aad0b126098f1df697ddd59
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Sep 28 12:33:53 2020 +1300

Bug 1897199: import comment text and hide author name

When importing comments, the author name or id should not be imported
When exporting comments, the author name or id should not be imported

Change-Id: Ia05fdb8cf6004b9be145e3740c9dc89a58f45bbb

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "20.10_STABLE" branch: https://reviews.mahara.org/11316

Lisa Seeto (lisaseeto)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/11316
Committed: https://git.mahara.org/mahara/mahara/commit/ba08ab2061896cdf5151806d7fc2fd8c9f2d5162
Submitter: Lisa Seeto (<email address hidden>)
Branch: 20.10_STABLE

commit ba08ab2061896cdf5151806d7fc2fd8c9f2d5162
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Sep 28 12:33:53 2020 +1300

Bug 1897199: import comment text and hide author name

When importing comments, the author name or id should not be imported
When exporting comments, the author name or id should not be imported

Change-Id: Ia05fdb8cf6004b9be145e3740c9dc89a58f45bbb
(cherry picked from commit 2b2348e3430f1e6d3aad0b126098f1df697ddd59)

Robert Lyon (robertl-9)
no longer affects: mahara/21.04
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 20.10.0 → none
no longer affects: mahara
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.