-
Notifications
You must be signed in to change notification settings - Fork 4
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
Set visibility based on Date Created #708
Conversation
return unless date | ||
Time.zone.parse(date) | ||
rescue | ||
Rails.logger.debug("Unable to parse created date: #{change_set.resource.primary_imported_metadata.created}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is debug
normally used for these types of errors, or would warn
be needed? (I'm uncertain as to whether or not the logging level might affect this).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched it to warn.
@@ -623,4 +623,55 @@ | |||
expect(solr_record["member_of_ssim"]).to eq ["id-#{parent.id}"] | |||
end | |||
end | |||
|
|||
context "setting visibility from remote metadata" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a test for the case where it's not checked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
|
||
def calculated_rights_statement | ||
if public_access? | ||
"http://rightsstatements.org/vocab/NKC/1.0/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're using this as a default somewhere else, too. At what point to we consider loading these into constants? Perhaps a new ticket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #709
10e96ad
to
caccdb5
Compare
Closes #691.
This adds a new checkbox to automatically set visibility/rights statement based on what the date of the object is. The checkbox looks like this: