Ethan's scenario would normally be my assumption of what happened, but it sounds like it may not be the case here due to what Nicola mentioned earlier in the thread
Yes they were created by the same user on the same device. They were about 2 hours apart.
I'd still very strongly recommend assigning unique prefix codes per user, but that may be more of a long term issue.
My default guess would actually have been that syncing caused the problem due to some unexplained behavior where the sync payload didn't include the updated Usercase value for the current ID counter, but if the user isn't syncing currently that wouldn't quite explain things.
Nicola - it would be helpful to go find the Form Submission in HQ which created the first case, and the subsequent second case with the same ID. If you look at the source XML for these two docs there are a few things that would be good to confirm to understand the current state.
1 - There should be a usercase update in the first submission where the counter is incremented to the next value. Confirming that this exists and set the counter forwards would be helpful
2 - It would be good to confirm that there's no indication that there were issues with the first submission. One very unlikely but plausible scenario is that there was an issue with the form structure and it was processed correctly on the server, but not on the device. If there's any indication on the form submission that something unusual occured, that would be helpful to know.
3 - You can confirm in the Meta block of the submission that the userid and deviceid are the exact same (you may have already done this, but just confirming). If they aren't, that may indicate a lead.
4 - In the usercase itself, you can click on the ID Counter property to see a history of its values over time. It would be good to confirm that the ID wasn't re-set back to its original count after being set forward for any reason
One final guess as well: Are your users using incomplete forms as part of their workflow? If so, you might need to set the way you use the incrementing ID slightly differently to ensure it's updated each time the form is loaded, as opposed to just on the first form load.
You could see if the incomplete forms issue was to blame by checking the form start and end times in the submissions. If one form was started before the other was ended, that might indicate that they started both forms against the same counter.