ropensci / ruODK

ruODK: An R Client for the ODK Central API
https://docs.ropensci.org/ruODK/
GNU General Public License v3.0
41 stars 12 forks source link

publishedAt should be used to identify form drafts #119

Closed lognaturel closed 3 years ago

lognaturel commented 3 years ago

https://github.com/ropensci/ruODK/issues/86 added filtering out unpublished forms from form lists. Looking at the tests here this uses version and hash to identify unpublished forms. However, those are only incidentally null in Central versions < 1.2 and will be populated in Central v1.2+.

From the docs:

The intended way to identify unpublished form is to match on publishedAt of null (e.g. in Briefcase). We now see this lacks documentation and will make sure that is updated. publishedAt exists for all Central versions that include drafts. To support earlier versions (though we don't recommend it), you could first check for the existence of publishedAt. If it doesn't exist, the form can be included because there can be no drafts to filter out.

florianm commented 3 years ago

IMG_20210427_175938.jpg Sophie had a general review comment on ODK

florianm commented 3 years ago

Fixed by adding published_at to form_list and form_detail, and clarifying in examples how to find form drafts. Thanks for the detailed bug report, @lognaturel!

lognaturel commented 3 years ago

Yaaaay, Sophie! Can't wait for your first pull request! 😊