-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Summary
We can nominate images for deletion, either uploaded by us or others. However, we need to send a legitimate reason for deletion. Also, we are supposed to add Uploaded Date
, Uploaded by
, and File Usage
in the final reason sent with the deletion request of our images. This was implemented in this PR #1824 in 2018.
Finding the file usages involves fetching data from the Commons API, which is a time-consuming task. But the result was not appended in the reason string before sending deletion requests, and fetching file usage became redundant in this case.
This issue should be focused on appending the metadata with the final reason and writing unit tests to prevent regressions in the future.
However, I also think we should consider appending similar metadata to the deletion requests made for others' contributions because we eventually call the getReason
function and not using the result here:
apps-android-commons/app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.kt
Lines 1730 to 1735 in 09da7b8
val resultSingletext: Single<Boolean> = reasonBuilder.getReason(media, reason) | |
.flatMap { _ -> | |
deleteHelper.makeDeletion( | |
context, media, reason | |
) | |
} |
I am also concerned with the reason template we have currently. This how it will look after above fix:
I uploaded it by mistakeUploaded by myself on Sep 16, 2024, used in 3 article(s) at least.
It can be improved based on suggestions. So, please give your valuable feedback :)
Some of the template alternatives are:
- I uploaded it by mistake (uploaded on Sep 16, 2024, used in at least 3 article(s)).
- I uploaded it by mistake [uploaded on Sep 16, 2024; used in ≥3 article(s)]
- I uploaded it by mistake – uploaded on Sep 16, 2024, used in 3+ article(s).
- I uploaded it by mistake: uploaded on Sep 16, 2024, used in at least 3 article(s).
- Reason: I uploaded it by mistake; Uploaded: Sep 16, 2024; Used by: 3 article(s);
Steps to reproduce
- Open any of your contribution(Prefer which you want to delete)
- When navigated to the Media Details Screen, scroll down and click
Nominate for Deletion
- Choose an appropriate reason for deletion (ed:
Sorry this picture is not interesting for an encyclopedia
) - Wait for the request to complete
- Visit your uploaded image's page on the Commons Website (eg: image)
- You must see a dialog like this:

- Click on
the nomination page
Expected behaviour
You should see your request for deletion with your chosen reason appended with metadata like this:
<Your reason>Uploaded on <date> and used in <no. of file usages> article(s).
Eg:
Sorry this picture is not interesting for an encyclopediaUploaded on 21 January 2024 and used in 1 article(s).
Actual behaviour
Only the exact reason is shown without any other information.
Device name
Samsung A14
Android version
Android 14
Commons app version
main-branch
Device logs
No response
Screen-shots
Current situation when we mark our image for deletion.
Would you like to work on the issue?
Yes