platelet-app / platelet

Dispatch system for emergency volunteer couriers.
https://platelet.app
Apache License 2.0
38 stars 10 forks source link

History view for old tasks #136

Closed duckbytes closed 1 year ago

duckbytes commented 1 year ago

Adds a view to let admins view historical task data.

Allows sorting by created time and selection of data ranges.

Should show a simplified view to see information about the task, but cannot be edited.

A button could allow navigating to the task on the dashboard, but this button will be disabled if the task is archived (once the archive script work is merged).

codecov-commenter commented 1 year ago

Codecov Report

Merging #136 (3a181e9) into master (450f507) will increase coverage by 0.60%. The diff coverage is 67.61%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   59.61%   60.21%   +0.60%     
==========================================
  Files         304      324      +20     
  Lines       10010    10671     +661     
  Branches     2539     2714     +175     
==========================================
+ Hits         5967     6426     +459     
- Misses       3678     3882     +204     
+ Partials      365      363       -2     
Impacted Files Coverage Δ
src/components/CommentsBadge.tsx 85.71% <ø> (-1.79%) :arrow_down:
src/components/LoadingSpinner.js 92.15% <ø> (ø)
src/components/UserChip.tsx 81.48% <ø> (+18.51%) :arrow_up:
src/graphql/mutations.ts 0.00% <0.00%> (ø)
src/graphql/queries.ts 0.00% <0.00%> (ø)
src/graphql/subscriptions.ts 0.00% <0.00%> (ø)
src/models/schema.js 100.00% <ø> (ø)
src/navigation/MainWindow.js 0.00% <0.00%> (ø)
src/navigation/NavDrawerItems.js 0.00% <0.00%> (ø)
...c/scenes/Dashboard/components/TaskCardsColoured.js 86.15% <ø> (ø)
... and 22 more

... and 1 file with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

duckbytes commented 1 year ago

Navigating to /history gives a list of tasks, with some controls:

image

Selecting a day starts the list from that many days ago (select 3 days and the top task will be from 3 days ago). Scroll to load more tasks going back in time.

Can also select a custom date range:

image

And sort by newest or oldest tasks.

The sorting is done by the time the task is created (server side set createAt field).

Screenshot from 2023-03-24 14-25-45

Screenshot from 2023-03-24 14-25-48

Click on an item to show a read-only summary of the task, including a timeline of events. Assignments or items that are deleted are highlighted as deleted items.

You can also navigate to the dashboard version of the task, however once task archiving is implemented this button will only be available for unarchived tasks.

@Joetooker95 can you provide feedback please? Anything that might be missed or helpful?

Joetooker95 commented 1 year ago

This looks great, good to be able to find data older than 2 weeks, is this separate to the CSV file or same but the above screenshot suggests it's now in a different format?

duckbytes commented 1 year ago

This looks great, good to be able to find data older than 2 weeks, is this separate to the CSV file or same but the above screenshot suggests it's now in a different format?

It's separate to the CSV export. There isn't a way to export data form this view. More or less it's for admins who want to look up some job that happened in the past.

Like if we want to know what happened (who, where, when, etc.) of a job from 6 months ago then we can find it with this view.

Of course it probably could be used for stat counting too if it's easier than reading the CSV. We just have to bear in mind that the way this view is sorted and the timestamps are the time the job is created.

Joetooker95 commented 1 year ago

Okay thank you, so will this mean we still can’t run a CSV file older than 2 weeks?Kind regardsJoe TookerOn 31 Mar 2023, at 21:03, Theo @.***> wrote:

This looks great, good to be able to find data older than 2 weeks, is this separate to the CSV file or same but the above screenshot suggests it's now in a different format?

It's separate to the CSV export. There isn't a way to export data form this view. More or less it's for admins who want to look up some job that happened in the past. Like if we want to know what happened (who, where, when, etc.) of a job from 6 months ago then we can find it with this view. Of course it probably could be used for stat counting too if it's easier than reading the CSV. We just have to bear in mind that the way this view is sorted and the timestamps are the time the job is created.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

duckbytes commented 1 year ago

Okay thank you, so will this mean we still can’t run a CSV file older than 2 weeks?

Not yet. We could look at that next if you like. I'm just keen to nail down requirements and workflow before I start on anything.