[
https://issues.apache.org/jira/browse/SYNCOPE-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrea Patricelli updated SYNCOPE-1906:
---------------------------------------
Description:
* Run Syncope with sample data on any DBMS
* Update users, for example the test ones, to have ctype attribute with values
[aa1, aa2, aa3, aa4, aa5]
* Perform a list query from console or directly via API to
{noformat}
/syncope/rest/users?orderBy=ctype%20DESC{noformat}
(without filter) ordered by ctype, DESC (or ASC).
* Order of the result is not compliant with the requested one
This is due to this search query
{code:java}
SELECT DISTINCT sv.any_id,sva.stringValue AS ctype FROM user_search sv LEFT
JOIN user_search_attr sva ON sv.any_id=sva.any_id WHERE ((id IS NOT NULL) AND
(realm_id IN (?1,?2,?3,?4))) ORDER BY ctype DESC{code}
That returns and sorts on all results of the query containing all user
attributes, not only the one used for sorting.
was:
* Run Syncope with sample data on any DBMS, *no JSON*
* Update users, for example the test ones, to have ctype attribute with values
[aa1, aa2, aa3, aa4, aa5]
* Perform a list query from console or directly via API to
{noformat}
/syncope/rest/users?orderBy=ctype%20DESC{noformat}
(without filter) ordered by ctype, DESC (or ASC).
* Order of the result is not compliant with the requested one
This is due to this search query
{code:java}
SELECT DISTINCT sv.any_id,sva.stringValue AS ctype FROM user_search sv LEFT
JOIN user_search_attr sva ON sv.any_id=sva.any_id WHERE ((id IS NOT NULL) AND
(realm_id IN (?1,?2,?3,?4))) ORDER BY ctype DESC{code}
That returns and sorts on all results of the query containing all user
attributes, not only the one used for sorting.
> Wrong result order if sorting by plain attribute
> ------------------------------------------------
>
> Key: SYNCOPE-1906
> URL: https://issues.apache.org/jira/browse/SYNCOPE-1906
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.13
> Reporter: Andrea Patricelli
> Assignee: Andrea Patricelli
> Priority: Major
> Fix For: 3.0.14
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> * Run Syncope with sample data on any DBMS
> * Update users, for example the test ones, to have ctype attribute with
> values [aa1, aa2, aa3, aa4, aa5]
> * Perform a list query from console or directly via API to
> {noformat}
> /syncope/rest/users?orderBy=ctype%20DESC{noformat}
> (without filter) ordered by ctype, DESC (or ASC).
> * Order of the result is not compliant with the requested one
> This is due to this search query
> {code:java}
> SELECT DISTINCT sv.any_id,sva.stringValue AS ctype FROM user_search sv LEFT
> JOIN user_search_attr sva ON sv.any_id=sva.any_id WHERE ((id IS NOT NULL) AND
> (realm_id IN (?1,?2,?3,?4))) ORDER BY ctype DESC{code}
> That returns and sorts on all results of the query containing all user
> attributes, not only the one used for sorting.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)