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

HH - Cache Available Permissible Values [#171868635] #2271

Conversation

heathharrelson
Copy link
Contributor

Only add permissible values where is_available is true to the RequestStore cache. Fixes a regression from SPARCRequest 3.5 where disabled values appear in the protocol form.

Pivotal Tracker: https://www.pivotaltracker.com/story/show/171868635

Context

At OHSU, we have customized SPARCRequest by creating new permissible values and setting others unavailable. For example, in the study_type category, the values "Clinical Trials," "Basic Science," and "Translational Science" are unavailable. The result in 3.5.0 is this (note that we also customized the title through the locale file):

image

In SPARCRequest 3.6, all of the unavailable permissible values are present in the protocol form.

Screen Shot 2020-03-30 at 13 45 15

This seems to be related to the introduction of caching in the PermissibleValue model. The change in this pull request caches only the available permissible values, and with this change only the available permissible values are present in the protocol form.

Screenshot_2020-03-30 SPARCRequest

Only add permissible values where `is_available` is true to the
`RequestStore` cache. Fixes a regression from SPARCRequest 3.5
where disabled values appear in the protocol form.
@Stuart-Johnson Stuart-Johnson merged commit adce5ce into sparc-request:v3.7.0 Apr 2, 2020
@heathharrelson heathharrelson deleted the cache-available-permissible-values branch April 2, 2020 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants