getodk / central

ODK Central is a server that is easy to use, very fast, and stuffed with features that make data collection easier. Contribute and make the world a better place! ✨🗄✨
https://docs.getodk.org/central-intro/
Apache License 2.0
121 stars 145 forks source link

Negative ordinal numbers in submissions table #641

Closed dbemke closed 2 months ago

dbemke commented 2 months ago

Problem description

In one of forms in a project submissions aren’t numbered correctly. There are negative numbers in ordinal numbers of submissions. I tried to reproduce it by adding submissions or checking some other forms with many submissions but the URL below is the only example of the issue I could find so I don’t know what’s the factor causing it or how to reproduce it. The issue doesn’t occur e.g. in https://test.getodk.cloud/#/projects/436/forms/all-widgets/submissions In Firefox I also noticed that the table isn't even.

URL of the page

https://test.getodk.cloud/#/projects/385/forms/all-widgets/submissions

Steps to reproduce the problem

  1. Open the URL with submissions ("URL of the page").
  2. Scroll down and check ordinal numbers of submissions

    Screenshot

    all385

Expected behavior

Ordinal numbers in submission should start from 1.

Central version shown in version.txt

https://test.getodk.cloud/ versions: 9a9ec7c034de07e990c9c408ca768326e2154c96 (v2023.5.1-10-g9a9ec7c) +c25bc15087ca045496d3bdbc806ca0752b955216 client (v2023.5.0-64-gc25bc150) +cfe46c97e6e38d8e551ce253ba47d0b378d19352 server (v2023.5.0-56-gcfe46c97)

Browser

Chrome, Firefox

matthew-white commented 2 months ago

This is likely the same issue as #608, though the example you identified is different from the two mentioned in that issue. We should have a fix for #608 soon, and once we do, we should check that all the examples have been fixed, both for that issue and for this one. We think the behavior described in this issue can happen when an instance ID is reused, for example, by two submissions in two different projects.

In Firefox I also noticed that the table isn't even.

This sounds like #607. Does that sound right?

dbemke commented 2 months ago

This sounds like https://github.com/getodk/central/issues/607. Does that sound right?

Yes

dbemke commented 2 months ago

While testing I thought about that issue one of our tests. We use ODK Briefcase to pull and push forms from/to Central. Can this duplicate instance IDs when I pull a form from one project and push it to a different project?

dbemke commented 2 months ago

The form simple mention in 608 issue is a form that we was used to send 1000 instances copied to Collect and send to Central

lognaturel commented 2 months ago

Can this duplicate instance IDs when I pull a form from one project and push it to a different project?

Yes, that's almost certainly what makes the bug appear. But the problem is the bug, not that you're making it appear! 😊

srujner commented 2 months ago

Tested with Success!

dbemke commented 2 months ago

Tested with Success!