Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] New field "last usage" #4187

Merged
merged 11 commits into from
Nov 3, 2023
Merged

Conversation

Aitorbp
Copy link
Contributor

@Aitorbp Aitorbp commented Oct 15, 2023

Related Issues

App: #4173

  • Added changelog files for the fixed issues in folder changelog/unreleased. More info here

QA

#4187 (comment)

@Aitorbp Aitorbp self-assigned this Oct 15, 2023
@Aitorbp Aitorbp linked an issue Oct 15, 2023 that may be closed by this pull request
7 tasks
@Aitorbp Aitorbp requested a review from JuancaG05 October 16, 2023 07:09
@Aitorbp Aitorbp force-pushed the feature/new_field_last_usage branch from 582e922 to 892d97b Compare October 16, 2023 12:26
Copy link
Contributor

@manuelplazaspalacio manuelplazaspalacio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes here.

@jesmrec
Copy link
Collaborator

jesmrec commented Oct 20, 2023

QA

Checks to be done:

  • New field created in DB, table of files
    • Fresh installation -> NULL
    • Migration -> Migration date for downloaded, NULL for non-downloaded
  • Download file -> last_usage updated
  • Preview non-downloaded file -> last_usage updated
  • Preview downloaded file
  • Rename file downlaoded -> last_usage updated
  • Move file downloaded -> last_usage updated
  • Rename file non-downlaoded -> last_usage not updated
  • Move file non-downloaded -> last_usage not updated
  • Copy file (downloaded and non-downloaded) -> last_usage not updated
  • Remove file locally -> last_usage to NULL
  • Remove folder locally
  • Open with - file downloaded
  • Open with - file not downloaded
  • Open with web - file downloaded
  • Open with web - file not downloaded - NA

Tested with

Pixel2 Android11
Galaxy A8 Android13

@manuelplazaspalacio
Copy link
Contributor

LGTM!!

@Aitorbp Aitorbp force-pushed the feature/new_field_last_usage branch from f09cd2c to 69abb24 Compare October 25, 2023 08:48
@jesmrec
Copy link
Collaborator

jesmrec commented Oct 25, 2023

(1) [FIXED]

  1. Download a previewable file (txt, image) -> lastUsage is updated
  2. Go back to the list of files
  3. Preview again the same file in 1.

Current: lastUsage is not updated
Expected: file is opened again, so lastUsage date must be updated

Galaxy Tab A8
d7879fc0233

@jesmrec
Copy link
Collaborator

jesmrec commented Oct 25, 2023

(2) [FIXED]

There is one missing case we did not comment in the feature planning:

  1. Download files that are inside a folder -> lastUsage is set for the files
  2. Open the options card of the folder and select Remove and Local only

Current: folder content is cleaned up locally, but the lastUsage field of every file inside the folder is still set.
Expected: folder content is cleaned up locally, so the lastUsage field of every file inside the folder should be set to NULL

Galaxy Tab A8
d7879fc0233

Copy link
Collaborator

@JuancaG05 JuancaG05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes needed here @Aitorbp!
Also, we need tests of the new classes and methods you added so that we don't keep track of the tests we are updating in other issues. Let's create at least the datasources tests 👍

@Aitorbp Aitorbp requested a review from JuancaG05 October 30, 2023 08:12
@Aitorbp Aitorbp force-pushed the feature/new_field_last_usage branch from dbc827b to 664bab4 Compare October 30, 2023 10:40
Copy link
Collaborator

@JuancaG05 JuancaG05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some last changes here and we're ready to go @Aitorbp 🚀

@Aitorbp Aitorbp requested a review from JuancaG05 October 30, 2023 13:28
Copy link
Collaborator

@JuancaG05 JuancaG05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now!! Good job @Aitorbp 🚀

@Aitorbp Aitorbp force-pushed the feature/new_field_last_usage branch from b756d50 to 80ea9fa Compare October 31, 2023 09:59
@jesmrec
Copy link
Collaborator

jesmrec commented Nov 2, 2023

3 calens commits (agreed 2). Please fix it.

@jesmrec
Copy link
Collaborator

jesmrec commented Nov 2, 2023

(3) [FIXED]

After checking some use cases, i think we should add another one: update lastUsage when Open with and Open with web option is clicked over a downloaded file. That means, we are opening the file with a 3rd party app and should count as an use. What do you think?

@Aitorbp
Copy link
Contributor Author

Aitorbp commented Nov 2, 2023

Yes, I think it would be good to add this use case too. Because of It is a file action too. I will work to add it.

@Aitorbp Aitorbp force-pushed the feature/new_field_last_usage branch from b4faeb0 to 3d79053 Compare November 2, 2023 11:54
@Aitorbp Aitorbp force-pushed the feature/new_field_last_usage branch from 0f41244 to d83e9c6 Compare November 2, 2023 12:11
@Aitorbp
Copy link
Contributor Author

Aitorbp commented Nov 3, 2023

@jesmrec can test again the issue. I added the new use case.

@jesmrec
Copy link
Collaborator

jesmrec commented Nov 3, 2023

@jesmrec can test again the issue. I added the new use case.

thanks. I noticed:

  • "open with" works fine
  • "open with web" (app providers) does not update the lastUsage

@jesmrec
Copy link
Collaborator

jesmrec commented Nov 3, 2023

@jesmrec can test again the issue. I added the new use case.

thanks. I noticed:

  • "open with" works fine
  • "open with web" (app providers) does not update the lastUsage

problem with "open with web" related with downloaded files. If file is downloaded, lastUsage is updated, otherwise, it doesn't.

@jesmrec
Copy link
Collaborator

jesmrec commented Nov 3, 2023

problem with "open with web" related with downloaded files. If file is downloaded, lastUsage is updated, otherwise, it doesn't.

that's expected, since non-downloaded files do not affect the issue.

@jesmrec
Copy link
Collaborator

jesmrec commented Nov 3, 2023

Approved on my side!

@Aitorbp Aitorbp merged commit 5954867 into master Nov 3, 2023
2 checks passed
@Aitorbp Aitorbp deleted the feature/new_field_last_usage branch November 3, 2023 09:15
Aitorbp added a commit that referenced this pull request Feb 5, 2024
[FEATURE REQUEST] New field "last usage"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] New field "last usage"
4 participants