-
Notifications
You must be signed in to change notification settings - Fork 4
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
Wrong calculation for isPublic field values #329
Labels
bug
Something isn't working
expands-search-api
Issues relating to the ExPaNDS Search API section of this repo
Comments
VKTB
added a commit
that referenced
this issue
Feb 14, 2022
VKTB
added a commit
that referenced
this issue
Feb 14, 2022
VKTB
added a commit
that referenced
this issue
Feb 14, 2022
VKTB
added a commit
that referenced
this issue
Feb 14, 2022
VKTB
added a commit
that referenced
this issue
Feb 14, 2022
7 tasks
VKTB
added a commit
that referenced
this issue
Feb 16, 2022
VKTB
added a commit
that referenced
this issue
Feb 16, 2022
VKTB
added a commit
that referenced
this issue
Feb 16, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
expands-search-api
Issues relating to the ExPaNDS Search API section of this repo
Description:
Sending the following request:
http://{{datagateway-api}}/search-api/documents?filter={"where": {"isPublic": false}, "limit": 5}
returns documents whose
isPublic
field value is set toFalse
.At the moment, we set the Document's
isPublic
field value based on the Investigation'sreleaseDate
ICAT field so if it was released more than 3 years ago then it is set toTrue
. This is wrong becausereleaseDate
is the date it was released publicly so the check should instead bereleaseDate <= today
. We do the same for the Dataset'sisPublic
field value but instead use the Dataset'screateTime
ICAT field which is not the correct field to be used. Instead we need to use the parent Investigation'sreleaseDate
field to determine if it is public or not.Considering that the Search API uses the anon user when querying ICAT, it means that all the data returned from ICAT is public so if there are any issues with getting the above working then we can just hardcode so that it always return
True
for theisPublic
fields and ignore the filter on those fields.Acceptance criteria:
isPublic
set toTrue
.isPublic
set toTrue
.The text was updated successfully, but these errors were encountered: