getodk / central

ODK Central is a server that is easy to use, very fast, and stuffed with features that make data collection easier. Contribute and make the world a better place! ✨🗄✨
https://docs.getodk.org/central-intro/
Apache License 2.0
126 stars 155 forks source link

Submission attachment is shown as downloadable even when it's missing #706

Open lognaturel opened 2 months ago

lognaturel commented 2 months ago

Problem description

Submission attachment is shown as downloadable even when it's missing

URL of the page

https://test.getodk.cloud/#/projects/149/forms/annotate_default/submissions

Steps to reproduce the problem

Make a submission with a missing attachment (for example, in Enketo, annotate an image, scale down the canvas, submit), view the submission table

Screenshot

Screenshot 2024-09-10 at 8 42 56 AM

Expected behavior

I would expect the missing file to be displayed differently. If it's not practical to change, we could just remove the "File was submitted." from the tooltip.

Central version shown in version.txt

versions:
f21b33acc8dae215e54485849e7dd59167e6f433 (v2024.1.0)
 3fb0c22b1cbdc3a6004963afcc3847a82c09307d client (v2024.1.0)
 b4754cf52bfa64b1ca841bc9ccb64a38726398e8 server (v2024.1.0)

Browser version

Firefox

Around when did you see the problem (in UTC)?

3:44 PM Tuesday, September 10, 2024

Other notes (if any)

matthew-white commented 2 months ago

I would expect the missing file to be displayed differently. If it's not practical to change, we could just remove the "File was submitted." from the tooltip.

I agree that it would be ideal for the missing file to be displayed differently. Currently, that's not information available to Frontend via the OData feed. Backend returns attachmentsExpected and attachmentsPresent, so Frontend can determine the number of missing files, but not which files are missing. I'm not sure how best for Backend to return that information, though I reckon there's got to be some way. But certainly it'd be very easy to remove that text from the tooltip.