Skip to content

Commit

Permalink
Replacing remaining instances of service_type and duration.
Browse files Browse the repository at this point in the history
  • Loading branch information
erinesullivan committed Feb 15, 2024
1 parent db52349 commit ac439d4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 60 deletions.
2 changes: 1 addition & 1 deletion config/get_this.yml
Original file line number Diff line number Diff line change
Expand Up @@ -448,4 +448,4 @@
- can_request?
- not_short_loan?
- not_building_use_only?
- not_reservable_library?
- not_reservable_library?
4 changes: 1 addition & 3 deletions local-gems/spectrum-json/lib/spectrum/request/place_hold.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def initialize(request:, username:)
@patron = Spectrum::Entities::AlmaUser.for(username: user)
@valid_account = @patron.active?
@option = Spectrum::Policy::GetThis.new(@patron, fetch_bib_record, fetch_holdings_record).resolve.reject do |service|
["Self Service", "Document Delivery"].include? service["service_type"]
["Get it off the shelves", "Have it delivered to your department", "Request to have a small portion scanned", "Request a copy from another institution (Interlibrary Loan (I.L.L.))"].include? service["label"]
end.first
end
rescue
Expand All @@ -35,8 +35,6 @@ def success_message
return {} unless @option
{
label: @option["label"],
service_type: @option["service_type"],
duration: @option["duration"],
description: {
heading: @option["description"]["heading"],
content: @option["description"]["content"].slice(0, @option["description"]["content"].length - 1)
Expand Down
4 changes: 0 additions & 4 deletions spec/fixtures/get_this_contactless_doc_del.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
],
"heading": "Policies and additional details"
},
"duration": "Expected availability 2-7 days",
"faq": null,
"form": {
"action": "https://ill.lib.umich.edu/illiad/illiad.dll",
Expand Down Expand Up @@ -109,7 +108,6 @@
},
"label": "Request to have a small portion scanned (Document Delivery)",
"orientation": "",
"service_type": "I.L.L./Document Delivery",
"tip": null
},
{
Expand All @@ -120,7 +118,6 @@
],
"heading": "Policies and additional details"
},
"duration": "Expected availability within 7 days",
"faq": null,
"form": {
"action": "/spectrum/mirlyn/hold",
Expand Down Expand Up @@ -169,7 +166,6 @@
},
"label": "Contactless pickup at the library",
"orientation": "",
"service_type": "Contactless pickup",
"tip": null
}
],
Expand Down
52 changes: 0 additions & 52 deletions spec/fixtures/get_this_policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
# Options
#log-in:
- label: Log in to see more options
service_type: Weblogin
description:
heading: Policies and additional details
content:
- TBD
duration: TBD
weight: 0
form:
method: post
Expand All @@ -29,7 +27,6 @@
- Did you do a semester abroad?
- Contact the circulation department for more information
- TBD
duration: TBD
weight: 0
form:
method: get
Expand All @@ -45,8 +42,6 @@

# ETAS / All Users
- label: Full text available online
service_type: HathiTrust Emergency Temporary Access
duration: simultaneous access is limited
description:
heading: Policies and additional details
content:
Expand All @@ -66,8 +61,6 @@

# Request a copy from another library - ann arbor
- label: Request a copy from another library (Interlibrary Loan (I.L.L.))
service_type: Document Delivery
duration: Expected availability 6-10 days*
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -145,8 +138,6 @@

# Request a copy from another library - flint
- label: Request a copy from another library (Interlibrary Loan (I.L.L.))
service_type: Document Delivery
duration: Expected availability 2-4 weeks*
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -224,13 +215,11 @@

# Request a digital copy:
- label: Request a digital copy (Interlibrary Loan (I.L.L.))
service_type: Document Delivery
description:
heading: Policies and additional details
content:
- Requests are filled via equivalent electronic resources if available.
- Loan terms and renewals vary by source.
duration: Delivery time varies by source
weight: 144
form:
method: get
Expand Down Expand Up @@ -301,7 +290,6 @@

- label: Request cannot be placed
weight: 144
duration: Service unavailable
orientation: >
This service is limited to current affiliates of the University of
Michigan. If you believe your status should allow access, please
Expand All @@ -319,8 +307,6 @@

# Have a small portion scanned -- local - ETAS
- label: Request to have a small portion scanned (Document Delivery)
service_type: I.L.L./Document Delivery
duration: Expected availability 2-7 days
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -397,8 +383,6 @@

# Have a small portion scanned -- local - not ETAS
- label: Request to have a small portion scanned (Document Delivery)
service_type: I.L.L./Document Delivery
duration: Expected availability 2-7 days
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -476,8 +460,6 @@

# Have a small portion scanned -- remote / On Order
- label: Request to have a small portion scanned (Document Delivery)
service_type: I.L.L./Document Delivery
duration: Expected availability 1-10 days*
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -554,8 +536,6 @@

# Have a small portion scanned -- remote / Flint
- label: Request to have a small portion scanned (Document Delivery)
service_type: I.L.L./Document Delivery
duration: Expected availability 1-10 days*
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -631,8 +611,6 @@

# Contactless Pickup @Flint with item from AA
- label: Pick it up at the library (Library to Library)
service_type: Library pick up
duration: Expected availabiltiy 10 days
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -680,8 +658,6 @@

# Contactless Pickup @Flint
- label: Pick it up at the library
service_type: Library pick up
duration: Expected availabiltiy 1-2 days
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -729,8 +705,6 @@

# On Order @Flint
- label: Contactless Pickup at the library
service_type: Contactless pickup
duration: Click to see additional details
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -778,13 +752,11 @@

# Contactless Pickup @Shapiro or @AAEL
- label: Contactless pickup at the library
service_type: Contactless pickup
description:
heading: Policies and additional details
content:
- Standard loan and renewal policies apply. Once checked-out, your item cannot be recalled by another user.
- Learn more about <a href="https://lib.umich.edu/find-borrow-request/request-items-pick-or-delivery/contactless-pickup">contactless pickup</a>.
duration: Expected availability 2-4 days
weight: 72
form:
type: ajax
Expand Down Expand Up @@ -831,8 +803,6 @@

# On Order @Shapiro or @AAEL
- label: Contactless Pickup at the library
service_type: Contactless pickup
duration: Click to see additional details
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -885,8 +855,6 @@

# Contactless Pickup @Shapiro From Flint Campus
- label: Contactless pickup at the library
service_type: Contactless pickup
duration: Expected availability within 10 days
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -935,8 +903,6 @@

# On Order @Shapiro From Flint Campus
- label: Contactless pickup at the library
service_type: Contactless pickup
duration: Click to see additional details
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -986,13 +952,11 @@

# Contactless Pickup @Shapiro from AA
- label: Contactless pickup at the library
service_type: Contactless pickup
description:
heading: Policies and additional details
content:
- Standard loan and renewal policies apply. Once checked-out, your item cannot be recalled by another user.
- Learn more about <a href="https://lib.umich.edu/find-borrow-request/request-items-pick-or-delivery/contactless-pickup">contactless pickup</a>.
duration: Expected availability within 7 days
weight: 72
form:
type: ajax
Expand Down Expand Up @@ -1037,8 +1001,6 @@

# On Order @Shapiro from AA
- label: Contactless pickup at the library
service_type: Contactless pickup
duration: Click to see additional details
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -1089,13 +1051,11 @@

# Contactless Pickup @AAEL
- label: Contactless pickup at the library
service_type: Contactless pickup
description:
heading: Policies and additional details
content:
- Standard loan and renewal policies apply. Once checked-out, your item cannot be recalled by another user.
- Learn more about <a href="https://lib.umich.edu/find-borrow-request/request-items-pick-or-delivery/contactless-pickup">contactless pickup</a>.
duration: Expected availability within 7 days
weight: 72
form:
type: ajax
Expand Down Expand Up @@ -1140,8 +1100,6 @@

# On Order @AAEL
- label: Contactless pickup at the library
service_type: Contactless pickup
duration: Click to see additional details
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -1192,8 +1150,6 @@

# Contactless Pickup @Music
- label: Contactless pickup at the library
service_type: Contactless pickup
duration: Expected availability within 7 days
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -1243,8 +1199,6 @@

# On Order @Music
- label: Contactless pickup at the library
service_type: Contactless pickup
duration: Click to see additional details
description:
heading: Policies and additional details
content:
Expand Down Expand Up @@ -1295,13 +1249,11 @@

# Pickup @Mardigan
- label: Pick it up at the library (Library to Library)
service_type: Library pick up
description:
heading: Policies and additional details
content:
- Standard loan and renewal policies apply. Once checked-out, your item cannot be recalled by another user.
- Pick up is available by appointment. See <a href="https://library.umd.umich.edu/pickup/">Mardigan Library - Schedule Pick-Up / Return</a> for details.
duration: Expected availability within 10 days
weight: 72
form:
type: ajax
Expand Down Expand Up @@ -1346,13 +1298,11 @@

# Contactless Pickup @Mardigan
- label: Pick it up at the library (Library to Library)
service_type: Library pick up
description:
heading: Policies and additional details
content:
- Standard loan and renewal policies apply. Once checked-out, your item cannot be recalled by another user.
- Pick up is available by appointment. See <a href="https://library.umd.umich.edu/pickup/">Mardigan Library - Schedule Pick-Up / Return</a> for details.
duration: Expected availability within 10 days
weight: 72
form:
type: ajax
Expand Down Expand Up @@ -1396,8 +1346,6 @@

# On Order @Mardigan
- label: Pick it up at the library (Library to Library)
service_type: Library pick up
duration: Click to see additional details
description:
heading: Policies and additional details
content:
Expand Down

0 comments on commit ac439d4

Please sign in to comment.