• 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

13.33
/app/models/orangelight/record_mailer.rb
1
# frozen_string_literal: true
2

3
class Orangelight::RecordMailer < RecordMailer
1✔
4
  def email_record(documents, details, url_gen_params)
1✔
5
    begin
6
      title_field = details[:config].email.title_field
×
7
      if title_field
×
8
        [documents.first[title_field]].flatten.first
×
9
      else
10
        documents.first.to_semantic_values[:title]
×
11
      end
12
    rescue StandardError
13
      I18n.t('blacklight.email.text.default_title')
×
14
    end
15

16
    subject = if details[:subject]&.first.present?
×
17
                details[:subject].first
×
18
              else
19
                I18n.t('blacklight.email.text.subject', count: documents.length, title: '')
×
20
              end
21

22
    @documents      = documents
×
23
    @message        = details[:message]
×
24
    @config         = details[:config]
×
25
    @url_gen_params = url_gen_params
×
26

27
    mail(to: details[:to], reply_to: details[:reply_to], subject:)
×
28
  end
29
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