getodk / briefcase

ODK Briefcase is a Java application for fetching and pushing forms and their contents. It helps make billions of data points from ODK portable. Contribute and make the world a better place! ✨💼✨
https://docs.getodk.org/briefcase-intro
Other
60 stars 156 forks source link

On pull from Central, submission attachments are not requested if submission folder exists #886

Closed lognaturel closed 3 years ago

lognaturel commented 3 years ago

Software versions

Briefcase v1.17.4

Problem description

Pulling a submission is not an atomic action so it's possible to only get a subset of media attachments or even not get the submission XML. This makes it really important to pull all files on subsequent attempts.

Steps to reproduce the problem

  1. Pull a form with media
  2. Cancel while some media attachments for a submission are being downloaded
  3. Confirm that the submission directory only has partial media
  4. Attempt a new pull, let it succeed
  5. Confirm that the submission directory still only has partial media

Expected behavior

Either pull needs to be atomic for a submission or pulling again needs to check whether media files already exist before skipping them.