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 154 forks source link

Start pull form last submission pulled does not work after changing sd #802

Closed kkrawczyk123 closed 5 years ago

kkrawczyk123 commented 5 years ago

Software versions

Briefcase v1.17.x, Java v1.x.x, operating system Ubuntu, MacOS and Windows

Problem description

Start pull form last submission pulled does not work after changing sd

Steps to reproduce the problem

  1. Select "Start pull from last submission pulled" checkbox
  2. Pull form from Aggregate
  3. Send new submission of the form from Collect to Aggregate
  4. Change sd to another folder
  5. Pull form to new sd

Expected behavior

Only new submission should be pulled to newly chosen sd. Now, all submissions are pulled to new sd - all submissions should be pulled after using Clear pull history button.

Other information

Things you tried, stack traces, related issues, suggestions on how to fix it...

ggalmazor commented 5 years ago

Only new submission should be pulled to newly chosen sd

That's not necessarily true. The cursor to "start from last submission" is stored in the metadata.json file at the sd.

By changing to another sd, you are probably using different metadata and cursors.

ggalmazor commented 5 years ago

So, @kkrawczyk123 and I discussed this and we agree there's an expected behavior change that should be tested during the code-freeze phase of each release.

Now storage directories are expected to be portable, which means that when you receive an SD, forms should start pulls using cursors that are stored in the metadata.json files.