• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / orangelight / 4c391e0e-519a-40cb-8ad3-354445f4ce03

12 Aug 2025 08:47PM UTC coverage: 85.348% (-10.0%) from 95.335%
4c391e0e-519a-40cb-8ad3-354445f4ce03

push

circleci

web-flow
[#5143] Use access restriction note as Aeon ItemInfo1 if available (#5173)

With this commit, if a user visits a record with an access
restrictions note and presses the Reading Room Request
button, they will get to an Aeon form with the 'Restrictions'
field pre-filled with the restriction note.

If the record does not have an access restrictions note,
the field will be pre-filled with 'Reading Room Access Only',
as it has been previously.

Closes #5143

5493 of 6436 relevant lines covered (85.35%)

251.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.0
/app/models/requests/holding_group.rb
1
# frozen_string_literal: true
2

3
# This class represents a group of physical holdings that
4
# are grouped together for display
5
class Requests::HoldingGroup
1✔
6
  include Comparable
1✔
7

8
  def initialize(group_name:, holdings:)
1✔
9
    @group_name = group_name
40✔
10
    @holdings = holdings
40✔
11
  end
12

13
  # rubocop:disable Lint/DuplicateBranch
14
  # :reek:DuplicateMethodCall
15
  def <=>(other)
1✔
16
    if firestone? && !other.firestone?
9✔
17
      -1 # Firestone should go first
×
18
    elsif !firestone? && other.firestone?
9✔
19
      1
×
20
    elsif off_site? && !other.off_site?
9✔
21
      1 # Off site locations should go last
×
22
    elsif !off_site? && other.off_site?
9✔
23
      -1
2✔
24
    else
25
      group_name <=> other.group_name
7✔
26
    end
27
  end
28
  # rubocop:enable Lint/DuplicateBranch
29

30
  def firestone?
1✔
31
    group_name.start_with? 'Firestone'
27✔
32
  end
33

34
  def off_site?
1✔
35
    group_name.start_with?('Annex', 'Forrestal') || group_name.include?('Remote Storage') || group_name.downcase.include?('(off-site)')
27✔
36
  end
37

38
  attr_reader :group_name, :holdings
1✔
39
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc