Skip to content

Fix semantic version sorting for agreements#294

Merged
bokelley merged 2 commits intomainfrom
bokelley/fix-version-display-order
Dec 12, 2025
Merged

Fix semantic version sorting for agreements#294
bokelley merged 2 commits intomainfrom
bokelley/fix-version-display-order

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Summary

When multiple agreement versions share the same effective date, the system now sorts by semantic version number to ensure the highest version is selected as current (e.g., 1.1.1 before 1.1).

Changes

  • Admin UI: Added compareVersions() function to sort agreement versions semantically
  • Database: Updated getCurrentAgreement() queries to use PostgreSQL's string_to_array() for proper semantic version comparison
  • Both database classes (OrganizationDatabase and CompanyDatabase) updated consistently

bokelley and others added 2 commits December 12, 2025 08:04
When multiple agreement versions share the same effective date, sort by
semantic version number (e.g., 1.1.1 before 1.1) to ensure the highest
version is selected as current. Updates both database queries and admin
UI to use consistent semantic version comparison logic.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley merged commit 72a5802 into main Dec 12, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant