Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd number generated every time a new entry is created #20319

Closed
SSG-Adam opened this issue May 16, 2024 · 2 comments
Closed

Odd number generated every time a new entry is created #20319

SSG-Adam opened this issue May 16, 2024 · 2 comments
Assignees
Labels
issue: bug Issue reporting a bug severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: core:database Source is core/database package status: confirmed Confirmed by a Strapi Team member or multiple community members version: 5

Comments

@SSG-Adam
Copy link

Bug report

Required System information

Node.js version: v20.6.1
NPM version: 9.8.1
Strapi version: 5.0.0-beta.3
Database: sqlite
Operating system: Ubuntu 22.04.4 LTS
Is your project Javascript or Typescript: TypeScript

Describe the bug

Example: If you have a Collection Type named "Skills" with a simple name field of text.
Every time you populate the numbers do not increment uniformly. Instead it's always increment at either a even or odd number.

Steps to reproduce the behavior

  1. Create a Collection Type. e.g: Skills
  2. Add in only one field of type text.
  3. Populate the collection type
  4. Publish/save
  5. Numbers either go from 1, 3, 5... or 2, 4, 6...

Expected behavior

It should produce numbers naturally without skipping any of them

@derrickmehaffy derrickmehaffy added issue: bug Issue reporting a bug severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: core:database Source is core/database package status: pending reproduction Waiting for free time to reproduce the issue, or more information version: 5 labels May 31, 2024
@Eventyret Eventyret self-assigned this Jun 11, 2024
@Eventyret Eventyret added status: confirmed Confirmed by a Strapi Team member or multiple community members and removed status: pending reproduction Waiting for free time to reproduce the issue, or more information labels Jun 11, 2024
@Eventyret
Copy link
Contributor

Confirmed 5.0.0-beta.9

Image

@joshuaellis
Copy link
Member

This is actually by design and not a bug. The ID of an entry is incremental, and because a document contains two entries e.g draft & publish, you will get this odd/even jumping.

@joshuaellis joshuaellis closed this as not planned Won't fix, can't repro, duplicate, stale Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: core:database Source is core/database package status: confirmed Confirmed by a Strapi Team member or multiple community members version: 5
Projects
Status: Fixed/Shipped
Status: Done
Status: Done
Development

No branches or pull requests

4 participants