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

_sort did not allow the use of underscore search parameter such as '_lastUpdated' #1003

Merged
merged 1 commit into from
Jun 27, 2019
Merged

Conversation

angusmillar
Copy link
Contributor

@angusmillar angusmillar commented Jun 6, 2019

When using the '_sort' search result parameter to order the returned results there was a bug in the API in that it checked that values of the sort must begin with a character that is either a letter or '-' for decreasing order. However, this rule neglected the case where the search parameter being used to sort was one of the 'Parameters for all resources' which all begin with an underscore character ''. The prime example of this would be '[base]/Patient?_sort=_lastUpdated'

This commit adds support for underscore and a new test case.

…results there was a bug in the API in that it checked that values of the _sort must begin with a character that is either a letter or '-' for decreasing order. However, this rule neglected the case where the search parameter being used to sort was one of the 'Parameters for all resources' which all begin with an underscore character '_'. The prime example of this would be '[base]/Patient?_sort=lastUpdated'

This commit adds support for underscore and a new test case.
@ewoutkramer
Copy link
Member

Thanks @angusmillar , will do a PR now so it will become part of the upcoming 1.3 release.

@ewoutkramer ewoutkramer merged commit 3f2fd08 into FirelyTeam:develop-r4 Jun 27, 2019
ewoutkramer pushed a commit that referenced this pull request Jun 27, 2019
_sort did not allow the use of underscore search parameter such as '_lastUpdated'
@ewoutkramer
Copy link
Member

I also created a PR (#1003) with a cherry pick for this to STU3.

ewoutkramer pushed a commit that referenced this pull request Jun 27, 2019
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.

None yet

2 participants