Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

improve: use uid preload for stable instanceIDs #229

Merged
merged 1 commit into from
May 31, 2019

Conversation

lognaturel
Copy link
Member

Closes #228

Warning: I have not tried this.

@issa-tseng Our conversation about instanceID in the context of Central made me think of this. As you can see, this explains why servers don't have to think too much about instanceID collisions -- the IDs are not actually stable across form edit sessions.

As there's talk of better supporting edit workflows and links between forms, stable instanceIDs become important. This change will happen in pyxform soon and since there's a Build release pending, I thought I'd try to squeeze this in at the 23:59th hour...

Feel free to do your own commit if you don't like my commit message or if it's wrong in some way. Or if you'd rather not squeeze something like this in, I understand.

@issa-tseng
Copy link
Member

issa-tseng commented May 31, 2019

well, if you are sure the generated xml does the correct thing i'm very happy to merge this.

@issa-tseng issa-tseng self-requested a review May 31, 2019 21:31
@issa-tseng issa-tseng merged commit 62fe9e6 into getodk:master May 31, 2019
@lognaturel lognaturel deleted the uid-preload branch May 31, 2019 21:41
@lognaturel
Copy link
Member Author

For posterity, I verified change-description.xml.txt in Collect 1.22 and confirmed the instanceID does not change across edit sessions. Hopefully you can confirm that the change I made results in XML like that. That is:

<bind jr:preload="uid" nodeset="/change-description/meta/instanceID" readonly="true()" type="string"/>

There's some small amount of risk that somehow users are relying on unstable instanceIDs or that users of old clients will be surprised by the format of the UUID but I think that it's a change we have to make sooner than later.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use UID preload instead of uuid() expression for stable instanceIDs
2 participants