gwu-libraries / scholarspace

GWU's Sufia-based repository app for preservation and open access to scholarly output of the GWU community
MIT License
0 stars 0 forks source link

catalog_controller patch #193

Closed kerchner closed 8 years ago

kerchner commented 8 years ago

Apply the patch as per posting from @mjgiarlo:

From: Mike Giarlo mjgiarlo@stanford.edu Date: Wed, Dec 16, 2015 at 2:36 PM Subject: [hydra-tech] Patch for Sufia 6.4 and 6.5 To: "hydra-tech@googlegroups.com" hydra-tech@googlegroups.com, "hydra-community@googlegroups.com" hydra-community@googlegroups.com, "hydra-partners@googlegroups.com" hydra-partners@googlegroups.com

Hi folks,

If you've upgraded any of your Sufia-based apps to 6.4 or 6.5, we've noticed that a step was missed in the upgrade path, with one wrinkle: this change is only for instances of Sufia that have never been based on Fedora 3; if you started with an app based on Sufia < 6, you will not want this patch.

I've added the patch to the upgrade documentation [1], but those who've already updated to >= 6.4 will need to apply this patch manually (again, if the instance has only ever been Fedora 4-based).

Change these lines of code in app/controllers/catalog_controller.rb:

   def self.uploaded_field
-    solr_name('date_uploaded', :stored_sortable, type: :date)
+    solr_name('system_create', :stored_sortable, type: :date)
   end

   def self.modified_field
-    solr_name('date_modified', :stored_sortable, type: :date)
+    solr_name('system_modified', :stored_sortable, type: :date)
   end

Please do let me know if you have any questions!

-Mike

P.S. Thanks to Olli Lyytinen for the patch and Anna Headley for discovering this oversight in the upgrade path.```