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

Fix sorting by documents count implementation #123

Merged
merged 3 commits into from
May 6, 2024

Conversation

pshenmic
Copy link
Owner

@pshenmic pshenmic commented May 6, 2024

Issue

Recently merged in sortBy feature #121 contains severe issue - sortBy is counting documents of data contracts by database id, rather than its identifier, thus it incorrectly counts amount of documents, if they were submitted in different data contract revisions. This PR fixes documentsCount field to include documents from all data contract's revisions

Things done

Implemented correct SQL documents count calculation in:

  • getDataContractByIdentifier()
  • getDataContracts()
  • getDataContractsByIdentity()
  • Added test cases in data.contracts.spec integration tests

@pshenmic pshenmic added the frontend Related to fronted (UI) label May 6, 2024
@pshenmic pshenmic self-assigned this May 6, 2024
Copy link

vercel bot commented May 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
platform-explorer-zham ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2024 7:33am

@pshenmic pshenmic changed the title Fix doc count orderBy implementation Fix sorting by documents count implementation May 6, 2024
@pshenmic pshenmic merged commit 7b0d84f into master May 6, 2024
6 checks passed
@owl352 owl352 deleted the fix/doc-count-by-identifier branch November 23, 2024 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Related to fronted (UI)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant