mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
fix: total number should be correct now in search (#5355)
The issue was that we all features were created exactly in same time, and our feature counter waas expecting time to be unique to feature, which was not the case.
This commit is contained in:
parent
11533bf97a
commit
e79e30de96
@ -709,7 +709,7 @@ class FeatureStrategiesStore implements IFeatureStrategiesStore {
|
|||||||
const [, envName] = sortBy.split(':');
|
const [, envName] = sortBy.split(':');
|
||||||
rankingSql += this.db
|
rankingSql += this.db
|
||||||
.raw(
|
.raw(
|
||||||
`CASE WHEN feature_environments.environment = ? THEN feature_environments.enabled ELSE NULL END ${validatedSortOrder} NULLS LAST, features.created_at asc`,
|
`CASE WHEN feature_environments.environment = ? THEN feature_environments.enabled ELSE NULL END ${validatedSortOrder} NULLS LAST, features.created_at asc, features.name asc`,
|
||||||
[envName],
|
[envName],
|
||||||
)
|
)
|
||||||
.toString();
|
.toString();
|
||||||
@ -718,9 +718,9 @@ class FeatureStrategiesStore implements IFeatureStrategiesStore {
|
|||||||
.raw(`?? ${validatedSortOrder}`, [
|
.raw(`?? ${validatedSortOrder}`, [
|
||||||
sortByMapping[sortBy],
|
sortByMapping[sortBy],
|
||||||
])
|
])
|
||||||
.toString()}, features.created_at asc`;
|
.toString()}, features.created_at asc, features.name asc`;
|
||||||
} else {
|
} else {
|
||||||
rankingSql += `features.created_at ${validatedSortOrder}`;
|
rankingSql += `features.created_at ${validatedSortOrder}, features.name asc`;
|
||||||
}
|
}
|
||||||
|
|
||||||
query
|
query
|
||||||
|
Loading…
Reference in New Issue
Block a user