diff --git a/app/controllers/my_account/account_controller.rb b/app/controllers/my_account/account_controller.rb index f201379..2337246 100644 --- a/app/controllers/my_account/account_controller.rb +++ b/app/controllers/my_account/account_controller.rb @@ -224,7 +224,7 @@ def get_illiad_data i['status'] = 'Charged' # checkouts << i else - i['shipped'] = ship_date(i) + i['shipped'] = reshare_shipped_status(i) pending_requests << i end end @@ -364,12 +364,12 @@ def get_bd_requests # in the API response, but only provided as part of a marcxml description of the entire item record. marc = XmlSimple.xml_in(item['bibRecord']) f245 = marc['GetRecord'][0]['record'][0]['metadata'][0]['record'][0]['datafield'].find { |t| t['tag'] == '245' } - f245a = f245['subfield'].find { |sf| sf['code'] == 'a' } - f245b = f245['subfield'].find { |sf| sf['code'] == 'b' } + f245a = f245 && f245['subfield'].find { |sf| sf['code'] == 'a' } + f245b = f245 && f245['subfield'].find { |sf| sf['code'] == 'b' } title = f245b ? "#{f245a['content']} #{f245b['content']}" : f245a['content'] f100 = marc['GetRecord'][0]['record'][0]['metadata'][0]['record'][0]['datafield'].find { |t| t['tag'] == '100' } - f100a = f100['subfield'].find { |sf| sf['code'] == 'a' } + f100a = f100 && f100['subfield'].find { |sf| sf['code'] == 'a' } author = f100a ? "#{f100a['content']}" : '' # For the final item, we add a fake item ID number (iid) for compatibility with other items in the system diff --git a/lib/my_account/version.rb b/lib/my_account/version.rb index d2b99f3..da80719 100644 --- a/lib/my_account/version.rb +++ b/lib/my_account/version.rb @@ -1,3 +1,3 @@ module MyAccount - VERSION = "2.2.2" + VERSION = "2.2.3" end diff --git a/release_notes.md b/release_notes.md index f66eaf9..9c9dd22 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,7 +1,9 @@ # Release Notes - my-account -## v2.2.2 +## v2.2.3 +- Fix bug in shipped date calculation that prevented requests from loading. +## v2.2.2 ### Improvements - Show date shipped for ReShare items in pending requests. - Show author for ReShare items in requests.