-
Notifications
You must be signed in to change notification settings - Fork 0
Trigger OpenAlex lookups on articles only #392
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,13 +86,14 @@ | |
|
|
||
| <%# LibKey links are our preferred links so we call the API when possible to get these preferred links %> | ||
| <% if ThirdIron.enabled? && result[:doi].present? %> | ||
| <%= render(partial: 'trigger_libkey', locals: { kind: 'doi', identifier: result[:doi] }) %> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noting partially to help me keep track. I think this is different than some other triggers because we only put OpenAlex links if LibKey fails in this condition... so we want to only do that if it is an article hence our need to pass I that state here versus some other states in which we only trigger at by checking the new helper.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, that's correct! |
||
| <%= render(partial: 'trigger_libkey', locals: { kind: 'doi', identifier: result[:doi], format: result[:format] }) %> | ||
| <% elsif ThirdIron.enabled? && result[:pmid].present? %> | ||
| <%= render(partial: 'trigger_libkey', locals: { kind: 'pmid', identifier: result[:pmid] }) %> | ||
| <%= render(partial: 'trigger_libkey', locals: { kind: 'pmid', identifier: result[:pmid], format: result[:format] }) %> | ||
| <% end %> | ||
|
|
||
| <%# OpenAccess Links: If OA_ALWAYS is enabled, include them when available. If not we'll trigger when we have a DOI/PMID but LibKey does not return data. See app/views/thirdiron/libkey.html.erb %> | ||
| <% if Feature.enabled?(:oa_always) %> | ||
| <%# Only show OpenAccess links for articles %> | ||
| <% if Feature.enabled?(:oa_always) && article?(result[:format]) %> | ||
| <%= render(partial: 'trigger_openalex_setup', locals: { doi: result[:doi], pmid: result[:pmid] }) %> | ||
| <% end %> | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assignment Branch Condition size for
libkeyis too high. [<4, 17, 6> 18.47/17] [rubocop:Metrics/AbcSize]