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

curationexperts / laevigata / 81d38ff1-0878-4ecd-9e35-f66597a69ef0 / 2
97%
main: 97%

Build:
DEFAULT BRANCH: main
Ran 17 Aug 2023 05:12AM UTC
Files 129
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Aug 2023 05:05AM UTC coverage: 80.378% (+1.5%) from 78.918%
81d38ff1-0878-4ecd-9e35-f66597a69ef0.2

push

circleci

mark-dce
Fix embargo bug that is causing graduated ETDs to dispaly as embargoed

Scholarly Communication staff have noticed a number of ETDs that have
attached PDFs that are appearing as embargoed despite the contributors
having graduated and the ETDs having been published.

**ANALYSIS**
We have been able to track this down to a bug in how ETD SolrDocuments
compute the #under_embargo method.  The SolrDocument method just looks
for any value while the same method name on an actual ETD checks for a
date value and compares it against the current date.

At one time, embargos were either deleted rather than being deactivated
-OR-
The indexing service behaved differently in relation to the
embargo_release_date field (i.e. it was smart enough to not index it on
ETDs with deactivated embargos)

In either case, a regression occurred either in Hyrax or Laevigata at some
point that changed the behavior to index embargo_release_date on
SolrDocuments even when the embargo had expired or been deactivated.

**RESOLUTION**
Update the SolrDocument #under_embargo method to check against the current date to
match the behavior for ETD objects.

**BUG EXAMPLE**
```
irb(main):039:0> etd = Etd.find('rr171z58q')
=> #<Etd id: "rr171z58q", head: [#<ActiveTriples::Resource:0x788c0 ID:<http://127.0.0.1:8080/fedora/rest/prod/rr/17/1z/58/rr1...
irb(main):040:0> solr_doc = SolrDocument.find('rr171z58q')
Solr query: get select {:qt=>"document", :id=>"rr171z58q"}
Solr fetch (4.4ms)
=> #<SolrDocument:0x000055cabe2eefd0 @_source={"system_create_dtsi"=>"2022-05-02T15:28:40Z", "system_modified_dtsi"=>"2023-07...
irb(main):041:0> etd.under_embargo?
=> false
irb(main):042:0> solr_doc.under_embargo?
=> true
```

**RELEVANT CODE**
Hydra::AccessControls
https://github.com/samvera/hydra-head/blob/v11.0.7/hydra-access-controls/app/models/concerns/hydra/access_controls/embargoable.rb#L51-L53
https://github.com/samvera/hydra-head/blob/v11.0.7/hydra-access-controls/app/models/hydra/access_controls/embargo.... (continued)

2212 of 2752 relevant lines covered (80.38%)

13.46 hits per line

Source Files on job 81d38ff1-0878-4ecd-9e35-f66597a69ef0.2
  • Tree
  • List 0
  • Changed 69
  • Source Changed 0
  • Coverage Changed 69
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 81
  • ecfa1c36 on github
  • Prev Job for on main (#16f2efae-c434-4ee1-bd3c-4704940c33e1.1)
  • Next Job for on main (#4a813394-7a67-497e-9ca7-c7d4b116f9e3.1)
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

© 2026 Coveralls, Inc