Skip to content

Commit

Permalink
Merge pull request #31 from cul-it/dev
Browse files Browse the repository at this point in the history
v1.2.3: RMC items no longer appear in the volume selection list
  • Loading branch information
Baroquem committed May 16, 2016
2 parents a2b8124 + bdc836f commit 88ff38e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
9 changes: 9 additions & 0 deletions app/models/blacklight_cornell_requests/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,21 @@ def set_volumes(items)
num_chron = 0
num_year = 0

# Skip items if they're in RMC - they shouldn't appear in the list
items.delete_if do |item|
item['perm_location'].present? &&
item['perm_location']['code'].present? &&
item['perm_location']['code'].include?('rmc')
end

## take first integer from each of enum, chron and year
## if not populated, use big number to rank low
## if the field is blank, use 'z' to rank low
## record number of occurances for each of the
items.each do |item|

Rails.logger.warn "mjc12test: item: #{item}"

# item[:numeric_enumeration] = item[:item_enum][/\d+/]
enums = item[:item_enum].scan(/\d+/)
if enums.count > 0
Expand Down
2 changes: 1 addition & 1 deletion lib/blacklight_cornell_requests/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module BlacklightCornellRequests
VERSION = "1.2.2"
VERSION = "1.2.3"
end
8 changes: 6 additions & 2 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes - blacklight-cornell-requests

## v1.2.3

### Bug fixes
- RMC items no longer appear in the volume selection list

## v1.2.2

### Enhancements
Expand All @@ -8,7 +13,6 @@
- Added item location to copy selection view (DISCOVERYACCESS-2278)

### Bug fixes
- Users no longer get stuck in a loop when trying to request different volumes from a single record (DISCOVERYACCESS-2438)


## v1.2.1
Expand All @@ -27,4 +31,4 @@
## v1.1.4

### Bug fixes
- Added Borrow Direct API key and updated to latest version of borrow_direct gem to fix broken BD calling
- Added Borrow Direct API key and updated to latest version of borrow_direct gem to fix broken BD calling

0 comments on commit 88ff38e

Please sign in to comment.