Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access the date_modified property correctly? #957

Open
drh-stanford opened this issue Sep 1, 2016 · 0 comments
Open

How to access the date_modified property correctly? #957

drh-stanford opened this issue Sep 1, 2016 · 0 comments
Labels

Comments

@drh-stanford
Copy link

drh-stanford commented Sep 1, 2016

Descriptive summary

We're using v1.5.0 and have a question about the date_modified property. It's defined as a single valued property with the DC.modified predicate and indexed as a :date, but we're always getting nil from using the date_modified method in the SolrDocumentBehavior.

Expected behavior

date_modified should use the SolrDocument field date_modified_dtsi.

Actual behavior

date_modified use the SolrDocument field date_modified_ssi.

  #<SolrDocument:0x007fdb61d6f508
   @_source=
    {"system_create_dtsi"=>"2016-09-01T19:48:42Z",
     "system_modified_dtsi"=>"2016-09-01T19:48:42Z",
     "has_model_ssim"=>["VectorWork"],
     "id"=>"geo-work-1",
     "accessControl_ssim"=>["76d015f5-8f53-486a-a9f0-e84ed276d3b3"],
     "depositor_ssim"=>["[email protected]"],
     "depositor_tesim"=>["[email protected]"],
     "title_tesim"=>["Geo Work"],
     "title_sim"=>["Geo Work"],
     "date_modified_ssi"=>"2016-09-01T19:48:41Z",

See https://github.com/projecthydra/curation_concerns/blob/master/app/models/concerns/curation_concerns/required_metadata.rb#L24 for where the property is defined.

See https://github.com/projecthydra/curation_concerns/blob/master/app/presenters/curation_concerns/work_show_presenter.rb#L39 for where the presenter delegates to the SolrDocument.

See https://github.com/projecthydra/curation_concerns/blob/master/app/models/concerns/curation_concerns/solr_document_behavior.rb#L77 for where the SolrDocument gets the date_modified method.

Steps to reproduce the behavior

  1. Create a work in the UI
  2. Open a debugger and print out the SolrDocument associated with the presenter

Related work

N/A

cc @eliotjordan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant