Change date format in CSV export for 'Account details' report

Bug #1915961 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Gold

Bug Description

When you download the 'Account details' report as CSV file, the date for the last login is mentioned as 14 June 2021, 7:40. That makes it impossible to sort the column. The date in the export should be displayed as 2021-06-14, 7:40 instead so sorting is possible. However, when viewing the report online, the date format can stay for easier readability. It also looks like the sorting is done there correctly.

To replicate:

1. Add a few people to your site and log in as them. Masquerading won't help there.
2. Go to Admin menu -> Reports -> Accounts details report and activate the column 'Last login'.
3. View the report and see the login dates.
4. Download the CSV file.

Results:
- Expected: The date column in the CSV file can be sorted and shows the date as 2021-06-14, 7:40
- Actual result: The date column can't be sorted.

Tags: bite-sized
Gold (gold.catalyst)
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/11595

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

Reviewed: https://reviews.mahara.org/11595
Committed: https://git.mahara.org/mahara/mahara/commit/eabb9d070c1c1eee544c1b3a41305c1b000430a8
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit eabb9d070c1c1eee544c1b3a41305c1b000430a8
Author: Gold <email address hidden>
Date: Thu Mar 4 16:07:56 2021 +1300

Bug 1915961 - lastlogin value in CSV download.

Replaced the human readable lastlogin value for a more data friendly
format for the CSV download. Mahara has a standard W3C date format for
this and that has been used.

Testing:
* Ensure a number of users have logged in (masquerading won't update this
field)
* Browse to Admin > Reports and click Configure report
* Set Report type to People > Account details
* Expand Columns and select Last login
* Click Submit
* On the Account details report check the Last login column is of the
format 01 February 2021, 13:23
* Click Download and open the file
* Check the lastlogin column is of the format 2021-02-01T13:23+1300

Change-Id: Iaba76e1628735920311d89b130e78857c9d874f0
Note: your actual dates will vary.

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
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/11744

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.