diff --git a/app/helpers/date_helper.rb b/app/helpers/date_helper.rb index 3395dc65..8cd19855 100644 --- a/app/helpers/date_helper.rb +++ b/app/helpers/date_helper.rb @@ -5,6 +5,6 @@ def format_date(data) return if data[:value].blank? - data[:value].strftime(ApplicationHelper::DATE_DISPLAY_FORMAT) + data[:value].to_date.strftime(ApplicationHelper::DATE_DISPLAY_FORMAT) end end \ No newline at end of file diff --git a/app/models/content_object.rb b/app/models/content_object.rb index 091118fd..adb86a3e 100644 --- a/app/models/content_object.rb +++ b/app/models/content_object.rb @@ -43,7 +43,6 @@ def associated_objects end def amendments - # TODO: temporary superclass method for non-EDM objects to be able to use a standard view for all result types nil end @@ -187,7 +186,7 @@ def primary_sponsor end def primary_sponsor_party - get_first_from('primarySponsorParty_ses') + get_all_from('primarySponsorParty_ses') end def legislature @@ -288,6 +287,10 @@ def member_party get_first_from('memberParty_ses') end + def member_parties + get_all_from('memberParty_ses') + end + def answering_member get_first_from('answeringMember_ses') end @@ -300,6 +303,10 @@ def asking_member_party get_first_from('askingMemberParty_ses') end + def asking_member_parties + get_all_from('askingMemberParty_ses') + end + def lead_member get_first_from('leadMember_ses') end diff --git a/app/models/edm.rb b/app/models/edm.rb index 41aa8580..38d8292c 100644 --- a/app/models/edm.rb +++ b/app/models/edm.rb @@ -20,38 +20,29 @@ def amendments # Title is the title of the motion itself, with 'Amendment N' on the front # Reference is taken from identifier_t, after removing the first item - return if content_object_data['amendmentText_t'].blank? - return if content_object_data['amendment_numberOfSignatures_s'].blank? - return if content_object_data['amendment_primarySponsorPrinted_t'].blank? - return if content_object_data['amendment_primarySponsorParty_ses'].blank? - return if content_object_data['identifier_t'].blank? - return if content_object_data['amendment_dateTabled_dt'].blank? - original_hash = { - text: content_object_data['amendmentText_t'], - number_of_signatures: content_object_data['amendment_numberOfSignatures_s'], - primary_sponsor: content_object_data['amendment_primarySponsorPrinted_t'], - primary_sponsor_party: content_object_data['amendment_primarySponsorParty_ses'], - reference: content_object_data['identifier_t'].drop(1), - date_tabled: content_object_data['amendment_dateTabled_dt'], + text: content_object_data['amendmentText_t'].blank? ? {} : { value: content_object_data['amendmentText_t'], field_name: 'amendmentText_t' }, + number_of_signatures: content_object_data['amendment_numberOfSignatures_s'].blank? ? {} : { value: content_object_data['amendment_numberOfSignatures_s'], field_name: 'amendment_numberOfSignatures_s' }, + primary_sponsor: content_object_data['amendment_primarySponsor_ses'].blank? ? {} : { value: content_object_data['amendment_primarySponsor_ses'], field_name: 'amendment_primarySponsor_ses' }, + primary_sponsor_text: content_object_data['amendment_primarySponsorPrinted_t'].blank? ? {} : { value: content_object_data['amendment_primarySponsorPrinted_t'], field_name: 'amendment_primarySponsorPrinted_t' }, + primary_sponsor_party: content_object_data['amendment_primarySponsorParty_ses'].blank? ? {} : { value: content_object_data['amendment_primarySponsorParty_ses'], field_name: 'amendment_primarySponsorParty_ses' }, + reference: content_object_data['identifier_t']&.drop(1).blank? ? {} : { value: content_object_data['identifier_t']&.drop(1), field_name: 'identifier_t' }, + date_tabled: content_object_data['amendment_dateTabled_dt'].blank? ? {} : { value: content_object_data['amendment_dateTabled_dt'], field_name: 'amendment_dateTabled_dt' } } - result_hashes = original_hash[:text].zip( - original_hash[:number_of_signatures], - original_hash[:primary_sponsor], - original_hash[:primary_sponsor_party], - original_hash[:reference], - original_hash[:date_tabled], - ).map.with_index do |values, index| - { - index: index, - text: { value: values[0], field_name: 'amendmentText_t' }, - number_of_signatures: { value: values[1], field_name: 'amendment_numberOfSignatures_s' }, - primary_sponsor: { value: values[2], field_name: 'amendment_primarySponsorPrinted_t' }, - primary_sponsor_party: { value: values[3], field_name: 'amendment_primarySponsorParty_ses' }, - reference: { value: values[4], field_name: 'identifier_t' }, - date_tabled: { value: values[5]&.to_date, field_name: 'amendment_dateTabled_dt' }, - } + return [] if original_hash.values.pluck(:value).compact.blank? + + number_of_amendments = original_hash.values.pluck(:value).compact.map(&:size).max + keys = original_hash.keys + result_hashes = [] + + number_of_amendments.times do |iteration| + ret = {} + keys.each do |key| + ret[key] = { value: original_hash.dig(key, :value).blank? ? nil : original_hash.dig(key, :value)[iteration], field_name: original_hash.dig(key, :field_name) } + end + ret[:index] = iteration + result_hashes << ret end result_hashes diff --git a/app/models/question.rb b/app/models/question.rb index a955708c..236ff96f 100644 --- a/app/models/question.rb +++ b/app/models/question.rb @@ -72,6 +72,10 @@ def tabling_member_party get_first_from('tablingMemberParty_ses') end + def tabling_member_parties + get_all_from('tablingMemberParty_ses') + end + def answer_text get_first_as_html_from('answerText_t') end @@ -100,6 +104,10 @@ def answering_member_party get_first_from('answeringMemberParty_ses') end + def answering_member_parties + get_all_from('answeringMemberParty_ses') + end + def question? true end diff --git a/app/models/written_question.rb b/app/models/written_question.rb index c0042aaf..ba9beba6 100644 --- a/app/models/written_question.rb +++ b/app/models/written_question.rb @@ -76,10 +76,6 @@ def answering_body get_first_from('departmentPrinted_t') end - def asking_or_tabling_member_party - fallback(get_first_from('tablingMemberParty_ses'), get_first_from('askingMemberParty_ses')) - end - def attachment # this is the title of the attachment, rather than a link to the resource # there can be multiple titles, all of which will be displayed diff --git a/app/views/search/fragments/_simple_list.haml b/app/views/search/fragments/_simple_list.haml index 6fafb542..e46560c3 100644 --- a/app/views/search/fragments/_simple_list.haml +++ b/app/views/search/fragments/_simple_list.haml @@ -4,7 +4,7 @@ %span>= terminator - elsif items.size == 2 %span= object_display_name(items.first, singular: singular) - %span= "; " + %span>= "; " %span= object_display_name(items.last, singular: singular) %span>= terminator - elsif items.size > 2 diff --git a/app/views/search/index.html.erb b/app/views/search/index.html.erb index 69de59d4..1e04dbdf 100644 --- a/app/views/search/index.html.erb +++ b/app/views/search/index.html.erb @@ -4,8 +4,8 @@ <% end %> <% if Rails.env.development? %> -<%#= render 'search/fragments/data', data: @associated_object_data, title: 'Associated object data' %> -<%#= render 'search/fragments/data', data: @search_data.search, title: 'Search response' %> +<%= render 'search/fragments/data', data: @associated_object_data, title: 'Associated object data' %> +<%= render 'search/fragments/data', data: @search_data.search, title: 'Search response' %> <%#= render 'search/fragments/data', data: @ses_data, title: 'SES results' %> <%= render 'search/fragments/data', data: @search_data.facets, title: 'Facets' %> <%#= render 'search/fragments/data', data: @top_level, title: 'Hierarchy top level types' %> diff --git a/app/views/search/preliminary_sentences/_edm.haml b/app/views/search/preliminary_sentences/_edm.haml index e3469059..c13aac4a 100644 --- a/app/views/search/preliminary_sentences/_edm.haml +++ b/app/views/search/preliminary_sentences/_edm.haml @@ -13,7 +13,7 @@ %span= " (primary sponsor)" - else %span= " (primary sponsor, " - %span>= search_link(object.primary_sponsor_party) + %span>= render 'search/fragments/list', items: object.primary_sponsor_party, terminator: '', singular: false %span= ")" - unless object.other_sponsors.blank? %span>= render 'search/fragments/edm_sponsor_list', items: object.other_sponsors, terminator: '', singular: false diff --git a/app/views/search/results/_bill.html.erb b/app/views/search/results/_bill.html.erb index cba554de..03bcdf50 100644 --- a/app/views/search/results/_bill.html.erb +++ b/app/views/search/results/_bill.html.erb @@ -6,10 +6,9 @@
- <%= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %> + <%= render 'search/results/item_details/member', member: object.member, member_party: object.member_parties %>
-
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: false %> diff --git a/app/views/search/results/_command_paper.html.erb b/app/views/search/results/_command_paper.html.erb index f67b7160..18c41348 100644 --- a/app/views/search/results/_command_paper.html.erb +++ b/app/views/search/results/_command_paper.html.erb @@ -11,7 +11,6 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: false %> diff --git a/app/views/search/results/_committee_proceeding.html.erb b/app/views/search/results/_committee_proceeding.html.erb index 72cd598f..e8b2204e 100644 --- a/app/views/search/results/_committee_proceeding.html.erb +++ b/app/views/search/results/_committee_proceeding.html.erb @@ -13,10 +13,10 @@
- <%= render 'search/results/item_details/lead_member', lead_member: object.lead_member, lead_member_party: object.lead_member_party %> + <%= render 'search/results/item_details/lead_members', lead_members: object.lead_members, lablel: "Lead Member" %>
- <%= render 'search/results/item_details/answering_member', answering_member: object.answering_member, answering_member_party: nil, label: 'Answering Member' %> + <%= render 'search/results/item_details/answering_members', answering_members: object.answering_members, label: 'Answering Member' %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> diff --git a/app/views/search/results/_deposited_paper.html.erb b/app/views/search/results/_deposited_paper.html.erb index fe36d2cf..a28c22ae 100644 --- a/app/views/search/results/_deposited_paper.html.erb +++ b/app/views/search/results/_deposited_paper.html.erb @@ -13,10 +13,8 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> diff --git a/app/views/search/results/_early_day_motion.html.erb b/app/views/search/results/_early_day_motion.html.erb index 4647aa1f..8fba42d1 100644 --- a/app/views/search/results/_early_day_motion.html.erb +++ b/app/views/search/results/_early_day_motion.html.erb @@ -16,10 +16,8 @@ <%= render 'search/results/item_details/primary_sponsor', primary_sponsor: object.primary_sponsor, primary_sponsor_party: object.primary_sponsor_party %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/departments', departments: object.departments, hide_label: false %>
@@ -95,19 +93,15 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %>
- <%#= render 'search/results/item_details/commons_library_location', location: object.commons_library_location unless object.commons_library_location.blank? %>
- <%#= render 'search/results/item_details/lords_library_location', location: object.lords_library_location unless object.lords_library_location.blank? %>
diff --git a/app/views/search/results/_european_deposited_document.html.erb b/app/views/search/results/_european_deposited_document.html.erb index 9b6bf8b4..debfae10 100644 --- a/app/views/search/results/_european_deposited_document.html.erb +++ b/app/views/search/results/_european_deposited_document.html.erb @@ -6,10 +6,8 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -80,21 +78,15 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
<% end %> <% end %> - <%#= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> - <%#= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %>
diff --git a/app/views/search/results/_european_material.html.erb b/app/views/search/results/_european_material.html.erb index ec7c1fde..4463b945 100644 --- a/app/views/search/results/_european_material.html.erb +++ b/app/views/search/results/_european_material.html.erb @@ -11,10 +11,8 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/departments', departments: object.departments, hide_label: false %>
@@ -81,10 +79,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -92,10 +88,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> - <%#= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %>
diff --git a/app/views/search/results/_european_scrutiny_explanatory_memorandum.html.erb b/app/views/search/results/_european_scrutiny_explanatory_memorandum.html.erb index bf55d30a..634af4a1 100644 --- a/app/views/search/results/_european_scrutiny_explanatory_memorandum.html.erb +++ b/app/views/search/results/_european_scrutiny_explanatory_memorandum.html.erb @@ -6,10 +6,8 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -79,21 +77,15 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
<% end %> <% end %> - <%#= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> - <%#= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %>
diff --git a/app/views/search/results/_european_scrutiny_ministerial_correspondence.html.erb b/app/views/search/results/_european_scrutiny_ministerial_correspondence.html.erb index bfc1db21..de96c671 100644 --- a/app/views/search/results/_european_scrutiny_ministerial_correspondence.html.erb +++ b/app/views/search/results/_european_scrutiny_ministerial_correspondence.html.erb @@ -9,7 +9,6 @@ <%= render 'search/results/item_details/corresponding_minister', corresponding_minister: object.corresponding_minister %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -81,21 +80,15 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
<% end %> <% end %> - <%#= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> - <%#= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %>
diff --git a/app/views/search/results/_european_scrutiny_recommendation.html.erb b/app/views/search/results/_european_scrutiny_recommendation.html.erb index 6a60ea7b..450d9821 100644 --- a/app/views/search/results/_european_scrutiny_recommendation.html.erb +++ b/app/views/search/results/_european_scrutiny_recommendation.html.erb @@ -6,13 +6,10 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/departments', departments: object.departments, hide_label: false %>
@@ -81,30 +78,20 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
<% end %> <% end %> - <%#= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> - <%#= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> - <%#= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> - <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %>
- <%#= render 'search/results/item_details/commons_library_location', location: object.commons_library_location unless object.commons_library_location.blank? %>
- <%#= render 'search/results/item_details/lords_library_location', location: object.lords_library_location unless object.lords_library_location.blank? %>
diff --git a/app/views/search/results/_formal_proceeding.html.erb b/app/views/search/results/_formal_proceeding.html.erb index 7c4f373b..2705aa70 100644 --- a/app/views/search/results/_formal_proceeding.html.erb +++ b/app/views/search/results/_formal_proceeding.html.erb @@ -13,10 +13,9 @@
- <%= render 'search/results/item_details/lead_member', lead_member: object.lead_member, lead_member_party: object.lead_member_party %> + <%= render 'search/results/item_details/lead_members', lead_members: object.lead_member, label: 'Lead Member' %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -88,10 +87,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -99,9 +96,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_grand_committee_proceeding.html.erb b/app/views/search/results/_grand_committee_proceeding.html.erb index 9cad1d98..189c55fe 100644 --- a/app/views/search/results/_grand_committee_proceeding.html.erb +++ b/app/views/search/results/_grand_committee_proceeding.html.erb @@ -13,7 +13,7 @@
- <%= render 'search/results/item_details/lead_member', lead_member: object.lead_member, lead_member_party: object.lead_member_party %> + <%= render 'search/results/item_details/lead_members', lead_members: object.lead_members, label: 'Lead Member' %>
<%= render 'search/results/item_details/answering_members', answering_members: object.answering_members, label: 'Answering Member' %> @@ -88,10 +88,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -99,19 +97,15 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %>
- <%#= render 'search/results/item_details/commons_library_location', location: object.commons_library_location unless object.commons_library_location.blank? %>
- <%#= render 'search/results/item_details/lords_library_location', location: object.lords_library_location unless object.lords_library_location.blank? %>
diff --git a/app/views/search/results/_house_of_commons_paper.html.erb b/app/views/search/results/_house_of_commons_paper.html.erb index bae9c73d..ddaf2e54 100644 --- a/app/views/search/results/_house_of_commons_paper.html.erb +++ b/app/views/search/results/_house_of_commons_paper.html.erb @@ -11,7 +11,6 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -87,10 +86,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -98,9 +95,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_impact_assessment.html.erb b/app/views/search/results/_impact_assessment.html.erb index 036ee89e..4fe9f2ac 100644 --- a/app/views/search/results/_impact_assessment.html.erb +++ b/app/views/search/results/_impact_assessment.html.erb @@ -6,10 +6,8 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -82,10 +80,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -93,9 +89,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_ministerial_correction.html.erb b/app/views/search/results/_ministerial_correction.html.erb index c5998e1e..9ec8001b 100644 --- a/app/views/search/results/_ministerial_correction.html.erb +++ b/app/views/search/results/_ministerial_correction.html.erb @@ -13,10 +13,9 @@
- <%= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %> + <%= render 'search/results/item_details/member', member: object.member, member_party: object.member_parties %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -86,10 +85,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -97,9 +94,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_observation_on_a_petition.html.erb b/app/views/search/results/_observation_on_a_petition.html.erb index 7e330686..9843a583 100644 --- a/app/views/search/results/_observation_on_a_petition.html.erb +++ b/app/views/search/results/_observation_on_a_petition.html.erb @@ -13,10 +13,9 @@
- <%= render 'search/results/item_details/lead_member', lead_member: object.lead_member, lead_member_party: object.lead_member_party %> + <%= render 'search/results/item_details/lead_members', lead_members: object.lead_members, label: 'Lead Member' %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -86,10 +85,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -97,9 +94,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_oral_answer_to_question.html.erb b/app/views/search/results/_oral_answer_to_question.html.erb index 7af09fa1..8a761977 100644 --- a/app/views/search/results/_oral_answer_to_question.html.erb +++ b/app/views/search/results/_oral_answer_to_question.html.erb @@ -13,7 +13,7 @@
- <%= render 'search/results/item_details/answering_member', answering_member: object.answering_member, answering_member_party: object.answering_member_party, label: 'Answered by' %> + <%= render 'search/results/item_details/answering_member', answering_member: object.answering_member, answering_member_party: object.answering_member_parties, label: 'Answered by' %>
data-detailed-results-target="toggleHidden"> @@ -89,10 +89,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -100,9 +98,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_oral_question.html.erb b/app/views/search/results/_oral_question.html.erb index 27fa43b4..af0289ad 100644 --- a/app/views/search/results/_oral_question.html.erb +++ b/app/views/search/results/_oral_question.html.erb @@ -13,11 +13,11 @@
- <%= render 'search/results/item_details/asking_member', asking_member: object.asking_member, asking_member_party: object.asking_member_party, label: 'Asked by' %> + <%= render 'search/results/item_details/asking_or_tabling_member', asking_member: object.asking_member, tabling_member: object.tabling_member, asking_member_party: object.asking_member_parties, tabling_member_party: object.tabling_member_parties, label: 'Asked by' %>
class="item-details" data-detailed-results-target="toggleHidden"> - <%= render 'search/results/item_details/answering_member', answering_member: object.answering_member, answering_member_party: object.answering_member_party, label: 'Answered by' %> + <%= render 'search/results/item_details/answering_member', answering_member: object.answering_member, answering_member_party: object.answering_member_parties, label: 'Answered by' %>
@@ -93,10 +93,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -104,9 +102,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_oral_question_time_intervention.html.erb b/app/views/search/results/_oral_question_time_intervention.html.erb index c60fcef0..cf8411cf 100644 --- a/app/views/search/results/_oral_question_time_intervention.html.erb +++ b/app/views/search/results/_oral_question_time_intervention.html.erb @@ -13,13 +13,11 @@
- <%= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %> + <%= render 'search/results/item_details/member', member: object.member, member_party: object.member_parties %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/departments', departments: object.departments, hide_label: false %>
@@ -87,10 +85,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -98,9 +94,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_paper_ordered_to_be_printed.html.erb b/app/views/search/results/_paper_ordered_to_be_printed.html.erb index e364c30e..bf6cfe05 100644 --- a/app/views/search/results/_paper_ordered_to_be_printed.html.erb +++ b/app/views/search/results/_paper_ordered_to_be_printed.html.erb @@ -11,7 +11,6 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -85,10 +84,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -96,9 +93,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_paper_petition.html.erb b/app/views/search/results/_paper_petition.html.erb index 5513a145..448b1b7e 100644 --- a/app/views/search/results/_paper_petition.html.erb +++ b/app/views/search/results/_paper_petition.html.erb @@ -16,10 +16,8 @@ <%= render 'search/results/item_details/lead_member', lead_member: object.lead_member, lead_member_party: object.lead_member_party %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/departments', departments: object.departments, hide_label: false %>
@@ -86,10 +84,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -97,9 +93,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_parliamentary_committee.erb b/app/views/search/results/_parliamentary_committee.erb index 712427fb..ce7e8a11 100644 --- a/app/views/search/results/_parliamentary_committee.erb +++ b/app/views/search/results/_parliamentary_committee.erb @@ -6,13 +6,10 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/departments', departments: object.departments, hide_label: false %>
@@ -80,10 +77,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -93,7 +88,6 @@ <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> <%= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_parliamentary_paper_laid.html.erb b/app/views/search/results/_parliamentary_paper_laid.html.erb index 23c71eff..711d614a 100644 --- a/app/views/search/results/_parliamentary_paper_laid.html.erb +++ b/app/views/search/results/_parliamentary_paper_laid.html.erb @@ -11,7 +11,6 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -87,10 +86,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -98,9 +95,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_parliamentary_proceeding.html.erb b/app/views/search/results/_parliamentary_proceeding.html.erb index 0a81ad4f..a0d31bba 100644 --- a/app/views/search/results/_parliamentary_proceeding.html.erb +++ b/app/views/search/results/_parliamentary_proceeding.html.erb @@ -13,10 +13,10 @@
- <%= render 'search/results/item_details/lead_member', lead_member: object.lead_member, lead_member_party: object.lead_member_party %> + <%= render 'search/results/item_details/lead_members', lead_members: object.lead_members, label: 'Lead Member' %>
- <%= render 'search/results/item_details/answering_member', answering_member: object.answering_member, answering_member_party: nil, label: 'Answering Member' %> + <%= render 'search/results/item_details/answering_members', answering_members: object.answering_members, label: 'Answering Member' %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -88,10 +88,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -99,9 +97,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_private_act.html.erb b/app/views/search/results/_private_act.html.erb index b1f61a29..9db1b47f 100644 --- a/app/views/search/results/_private_act.html.erb +++ b/app/views/search/results/_private_act.html.erb @@ -76,10 +76,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
diff --git a/app/views/search/results/_proceeding_contribution.html.erb b/app/views/search/results/_proceeding_contribution.html.erb index c60fcef0..cf8411cf 100644 --- a/app/views/search/results/_proceeding_contribution.html.erb +++ b/app/views/search/results/_proceeding_contribution.html.erb @@ -13,13 +13,11 @@
- <%= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %> + <%= render 'search/results/item_details/member', member: object.member, member_party: object.member_parties %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/departments', departments: object.departments, hide_label: false %>
@@ -87,10 +85,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -98,9 +94,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_research_briefing.html.erb b/app/views/search/results/_research_briefing.html.erb index 4dbcbc1b..05c82cb2 100644 --- a/app/views/search/results/_research_briefing.html.erb +++ b/app/views/search/results/_research_briefing.html.erb @@ -18,10 +18,8 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/departments', departments: object.departments, hide_label: false %>
@@ -91,10 +89,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -102,10 +98,8 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> <%= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> - <%#= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %>
diff --git a/app/views/search/results/_statutory_instrument.html.erb b/app/views/search/results/_statutory_instrument.html.erb index 483e44de..fccc1ddd 100644 --- a/app/views/search/results/_statutory_instrument.html.erb +++ b/app/views/search/results/_statutory_instrument.html.erb @@ -18,7 +18,6 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -46,7 +45,7 @@
- <%= render 'search/results/item_details/procedure', procedure: object.paper_procedure %> + <%= render 'search/results/item_details/paper_procedure', procedure: object.paper_procedure %>
@@ -91,10 +90,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -102,9 +99,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_transport_and_works_act_order_application.html.erb b/app/views/search/results/_transport_and_works_act_order_application.html.erb index ec91a03e..e5032601 100644 --- a/app/views/search/results/_transport_and_works_act_order_application.html.erb +++ b/app/views/search/results/_transport_and_works_act_order_application.html.erb @@ -13,10 +13,8 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
id="content" data-detailed-results-target="toggleHidden"> @@ -88,10 +86,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -99,10 +95,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> - <%#= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %>
diff --git a/app/views/search/results/_unprinted_command_paper.html.erb b/app/views/search/results/_unprinted_command_paper.html.erb index 8c404f7f..f5593f45 100644 --- a/app/views/search/results/_unprinted_command_paper.html.erb +++ b/app/views/search/results/_unprinted_command_paper.html.erb @@ -11,7 +11,6 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -86,10 +85,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -97,9 +94,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_unprinted_paper.html.erb b/app/views/search/results/_unprinted_paper.html.erb index 84637577..ae4bcc9f 100644 --- a/app/views/search/results/_unprinted_paper.html.erb +++ b/app/views/search/results/_unprinted_paper.html.erb @@ -18,7 +18,6 @@
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -94,10 +93,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -105,9 +102,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_written_question.html.erb b/app/views/search/results/_written_question.html.erb index d1d10eca..41b0333f 100644 --- a/app/views/search/results/_written_question.html.erb +++ b/app/views/search/results/_written_question.html.erb @@ -13,11 +13,11 @@
- <%= render 'search/results/item_details/asking_member', asking_member: object.asking_member, asking_member_party: object.asking_or_tabling_member_party, label: 'Asked by' %> + <%= render 'search/results/item_details/asking_or_tabling_member', asking_member: object.asking_member, tabling_member: object.tabling_member, asking_member_party: object.asking_member_parties, tabling_member_party: object.tabling_member_parties, label: 'Asked by' %>
class="item-details" data-detailed-results-target="toggleHidden"> - <%= render 'search/results/item_details/answering_member', answering_member: object.answering_member, answering_member_party: object.answering_member_party, label: 'Answered by' %> + <%= render 'search/results/item_details/answering_member', answering_member: object.answering_member, answering_member_party: object.answering_member_parties, label: 'Answered by' %>
@@ -94,10 +94,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -105,9 +103,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/_written_statement.html.erb b/app/views/search/results/_written_statement.html.erb index 162ff226..c6694f2a 100644 --- a/app/views/search/results/_written_statement.html.erb +++ b/app/views/search/results/_written_statement.html.erb @@ -13,10 +13,9 @@
- <%= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %> + <%= render 'search/results/item_details/member', member: object.member, member_party: object.member_parties %>
- <%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %>
<%= render 'search/results/item_details/departments', departments: object.departments, hide_label: true %> @@ -86,10 +85,8 @@
- <%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %>
- <%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %>
@@ -97,9 +94,7 @@ <% end %> <%= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> - <%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> <%= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> - <%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> <%= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> <% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> diff --git a/app/views/search/results/item_details/_answering_member.html.erb b/app/views/search/results/item_details/_answering_member.html.erb index 9d675e0b..0a4ea39d 100644 --- a/app/views/search/results/item_details/_answering_member.html.erb +++ b/app/views/search/results/item_details/_answering_member.html.erb @@ -9,9 +9,7 @@ <%= object_display_name(answering_member, singular: false) %> <% unless answering_member_party.blank? %> - - (<%= object_display_name(answering_member_party, singular: false) %>) - + (<%= render 'search/fragments/simple_list', items: answering_member_party, terminator: "", singular: false %>) <% end %>
<% end %> \ No newline at end of file diff --git a/app/views/search/results/item_details/_answering_member_party.html.erb b/app/views/search/results/item_details/_answering_member_party.html.erb deleted file mode 100644 index f2aa649c..00000000 --- a/app/views/search/results/item_details/_answering_member_party.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% unless answering_member_party.blank? %> -
- - (<%= object_display_name(answering_member_party, singular: false) %>) - -
-<% end %> \ No newline at end of file diff --git a/app/views/search/results/item_details/_asking_member_party.html.erb b/app/views/search/results/item_details/_asking_member_party.html.erb deleted file mode 100644 index dcc60129..00000000 --- a/app/views/search/results/item_details/_asking_member_party.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% unless asking_member_party.blank? %> -
- - <%= object_display_name(asking_member_party, singular: false) %> - -
-<% end %> \ No newline at end of file diff --git a/app/views/search/results/item_details/_asking_or_tabling_member.html.erb b/app/views/search/results/item_details/_asking_or_tabling_member.html.erb new file mode 100644 index 00000000..793f1ca1 --- /dev/null +++ b/app/views/search/results/item_details/_asking_or_tabling_member.html.erb @@ -0,0 +1,22 @@ +<% unless asking_member.blank? && tabling_member.blank? %> +
+
+ <%= label %> +
+ <% if asking_member.blank? %> + + <%= object_display_name(tabling_member, singular: false) %> + + <% unless tabling_member_party.blank? %> + (<%= render 'search/fragments/simple_list', items: tabling_member_party, terminator: "", singular: false %>) + <% end %> + <% else %> + + <%= object_display_name(asking_member, singular: false) %> + + <% unless asking_member_party.blank? %> + (<%= render 'search/fragments/simple_list', items: asking_member_party, terminator: "", singular: false %>) + <% end %> + <% end %> +
+<% end %> \ No newline at end of file diff --git a/app/views/search/results/item_details/_content.html.erb b/app/views/search/results/item_details/_content.html.erb index 005a8163..b391aee5 100644 --- a/app/views/search/results/item_details/_content.html.erb +++ b/app/views/search/results/item_details/_content.html.erb @@ -2,6 +2,7 @@
<%= raw content[:value].truncate_words(50) %> +
<% end %> \ No newline at end of file diff --git a/app/views/search/results/item_details/_lead_member.html.erb b/app/views/search/results/item_details/_lead_member.html.erb index edcf0a36..e3616792 100644 --- a/app/views/search/results/item_details/_lead_member.html.erb +++ b/app/views/search/results/item_details/_lead_member.html.erb @@ -1,9 +1,15 @@ <% unless lead_member.blank? %>
-
Lead Member
- <%= object_display_name(lead_member, singular: false) %> +
+ Lead Member +
+ + <%= object_display_name(lead_member, singular: false) %> + <% unless lead_member_party.blank? %> - (<%= object_display_name(lead_member_party, singular: false) %>) + + (<%= object_display_name(lead_member_party, singular: false) %>) + <% end %>
<% end %> \ No newline at end of file diff --git a/app/views/search/results/item_details/_lead_member_party.html.erb b/app/views/search/results/item_details/_lead_member_party.html.erb deleted file mode 100644 index fb573097..00000000 --- a/app/views/search/results/item_details/_lead_member_party.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% unless lead_member_party.blank? %> -
- - (<%= object_display_name(lead_member_party, singular: false) %>) - -
-<% end %> \ No newline at end of file diff --git a/app/views/search/results/item_details/_lead_members.html.erb b/app/views/search/results/item_details/_lead_members.html.erb index d9b666d5..1b6a6809 100644 --- a/app/views/search/results/item_details/_lead_members.html.erb +++ b/app/views/search/results/item_details/_lead_members.html.erb @@ -1,4 +1,12 @@ -
-
Lead Member
- <%= render 'search/fragments/name_list', items: items, terminator: "", singular: false %> -
+<% unless lead_members.blank? %> +
+ <% unless label.blank? %> +
+ <%= label %> +
+ <% end %> + + <%= render 'search/fragments/simple_list', items: lead_members, terminator: "", singular: false %> + +
+<% end %> diff --git a/app/views/search/results/item_details/_member.html.erb b/app/views/search/results/item_details/_member.html.erb index 2c422f8a..565cabb3 100644 --- a/app/views/search/results/item_details/_member.html.erb +++ b/app/views/search/results/item_details/_member.html.erb @@ -7,9 +7,7 @@ <%= object_display_name(member, singular: false) %> <% unless member_party.blank? %> - - (<%= object_display_name(member_party, singular: false) %>) - + (<%= render 'search/fragments/simple_list', items: member_party, terminator: "", singular: false %>) <% end %>
<% end %> \ No newline at end of file diff --git a/app/views/search/results/item_details/_member_party.html.erb b/app/views/search/results/item_details/_member_party.html.erb deleted file mode 100644 index 71eae81b..00000000 --- a/app/views/search/results/item_details/_member_party.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% unless member_party.blank? %> -
- - (<%= object_display_name(member_party, singular: false) %>) - -
-<% end %> \ No newline at end of file diff --git a/app/views/search/results/item_details/_primary_sponsor.html.erb b/app/views/search/results/item_details/_primary_sponsor.html.erb index cb22b373..0b4c7103 100644 --- a/app/views/search/results/item_details/_primary_sponsor.html.erb +++ b/app/views/search/results/item_details/_primary_sponsor.html.erb @@ -7,9 +7,7 @@ <%= object_display_name(primary_sponsor, singular: false) %> <% unless primary_sponsor_party.blank? %> - - (<%= object_display_name(primary_sponsor_party, singular: false) %>) - + (<%= render 'search/fragments/simple_list', items: primary_sponsor_party, terminator: "", singular: false %>) <% end %>
<% end %> \ No newline at end of file diff --git a/app/views/search/results/item_details/_tabling_member.html.erb b/app/views/search/results/item_details/_tabling_member.html.erb index af5de756..2029b4d2 100644 --- a/app/views/search/results/item_details/_tabling_member.html.erb +++ b/app/views/search/results/item_details/_tabling_member.html.erb @@ -1,8 +1,15 @@ <% unless tabling_member.blank? %>
-
Tabling Member
+
+ Tabling Member +
<%= object_display_name(tabling_member, singular: false) %> + <% unless tabling_member_party.blank? %> + + (<%= object_display_name(tabling_member_party, singular: false) %>) + + <% end %>
<% end %> \ No newline at end of file diff --git a/app/views/search/results/item_details/_tabling_member_party.html.erb b/app/views/search/results/item_details/_tabling_member_party.html.erb deleted file mode 100644 index a78484be..00000000 --- a/app/views/search/results/item_details/_tabling_member_party.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% unless tabling_member_party.blank? %> -
- - (<%= object_display_name(tabling_member_party, singular: false) %>) - -
-<% end %> \ No newline at end of file diff --git a/coverage/.last_run.json b/coverage/.last_run.json index 6d923754..fbcf358c 100644 --- a/coverage/.last_run.json +++ b/coverage/.last_run.json @@ -1,5 +1,5 @@ { "result": { - "line": 83.05 + "line": 83.02 } } diff --git a/coverage/.resultset.json b/coverage/.resultset.json index e272ffa3..cb2fe22e 100644 --- a/coverage/.resultset.json +++ b/coverage/.resultset.json @@ -211,19 +211,19 @@ null, null, null, - 1796, + 1799, null, - 1795, - 1795, + 1798, + 1798, null, - 1795, + 1798, null, null, 1, - 2002, + 2005, 204, null, - 1798, + 1801, null, null, null, @@ -259,7 +259,7 @@ null, null, 1, - 2422, + 2425, null, null, 1, @@ -268,28 +268,28 @@ null, null, null, - 2427, + 2430, null, - 2427, + 2430, null, null, - 2363, + 2375, null, - 2363, - 1202, - 1202, + 2375, + 1214, + 1214, null, null, null, - 64, + 55, null, null, - 2427, + 2430, null, - 2427, + 2430, null, null, - 39, + 30, 1, null, null, @@ -300,16 +300,16 @@ 1, null, null, - 38, + 29, null, - 38, + 29, null, null, - 39, + 30, null, null, 1, - 2415, + 2418, null, null, 1, @@ -346,7 +346,7 @@ null, null, null, - 2427, + 2430, null, null, null, @@ -376,15 +376,15 @@ null, null, null, - 1202, - 1202, + 1214, + 1214, null, null, null, null, - 1202, + 1214, null, - 1201, + 1213, null, null, null @@ -573,7 +573,7 @@ 1, null, 1, - 1106, + 1107, null, null, 1, @@ -616,7 +616,6 @@ null, null, null, - null, 1, 0, null, @@ -859,6 +858,10 @@ null, null, 1, + 0, + null, + null, + 1, 4, null, null, @@ -871,6 +874,10 @@ null, null, 1, + 0, + null, + null, + 1, 3, null, null, @@ -949,9 +956,9 @@ null, null, 1, - 6166, + 6057, null, - 4110, + 4010, null, null, 1, @@ -1003,9 +1010,9 @@ null, null, null, - 5859, + 5968, null, - 16686, + 16892, null, null, 1, @@ -1604,7 +1611,7 @@ 1, null, 1, - 133, + 134, null, null, 1, @@ -1623,41 +1630,32 @@ null, null, null, - 70, - 18, - 18, - 18, - 18, - 18, - null, - null, - 18, - null, - null, - null, - null, - null, - null, - null, - 18, - null, - null, - null, - null, - null, - null, - null, - 23, - null, null, + 142, + 71, + 71, + 71, + 71, + 71, + 71, null, null, + 71, null, + 19, + 19, + 19, null, + 19, + 24, + 24, + 168, null, + 24, + 24, null, null, - 18, + 19, null, null, 1, @@ -2353,6 +2351,10 @@ null, null, 1, + 0, + null, + null, + 1, 100, null, null, @@ -2383,6 +2385,10 @@ 1, 0, null, + null, + 1, + 0, + null, null ] }, @@ -2995,7 +3001,7 @@ 1, null, 1, - 1449, + 1461, null, null, 1, @@ -3592,10 +3598,6 @@ null, null, 1, - 0, - null, - null, - 1, null, null, null, @@ -3659,6 +3661,6 @@ ] } }, - "timestamp": 1724317741 + "timestamp": 1724855850 } } diff --git a/coverage/index.html b/coverage/index.html index 0eea5166..ae81612a 100644 --- a/coverage/index.html +++ b/coverage/index.html @@ -14,7 +14,7 @@ loading
-
Generated 2024-08-22T10:09:01+01:00
+
Generated 2024-08-28T15:37:30+01:00
    @@ -23,14 +23,14 @@

    All Files ( - 83.06% + 83.02% covered at - 92.55 + 92.35 hits/line ) @@ -43,11 +43,11 @@

    - 1582 relevant lines, - 1314 lines covered and - 268 lines missed. + 1596 relevant lines, + 1325 lines covered and + 271 lines missed. ( - 83.06% + 83.02% )
    @@ -176,7 +176,7 @@

    64 61 3 - 724.45 + 725.86 @@ -303,12 +303,12 @@

    app/models/content_object.rb - 97.44 % - 569 - 273 - 266 - 7 - 292.15 + 96.75 % + 576 + 277 + 268 + 9 + 288.33 @@ -325,12 +325,12 @@

    app/models/edm.rb - 96.55 % - 78 - 29 - 28 + 97.30 % + 69 + 37 + 36 1 - 37.28 + 49.81 @@ -688,12 +688,12 @@

    app/models/question.rb - 88.00 % - 106 - 50 - 44 - 6 - 44.32 + 85.19 % + 114 + 54 + 46 + 8 + 41.07 @@ -726,7 +726,7 @@

    66 47 19 - 23.58 + 23.76 @@ -820,12 +820,12 @@

    app/models/written_question.rb - 87.50 % - 91 - 40 - 35 - 5 - 22.43 + 89.47 % + 87 + 38 + 34 + 4 + 23.58 @@ -3923,7 +3923,7 @@

    - data[:value].strftime(ApplicationHelper::DATE_DISPLAY_FORMAT) + data[:value].to_date.strftime(ApplicationHelper::DATE_DISPLAY_FORMAT)

    @@ -4342,8 +4342,8 @@

    -
  • - 1796 +
  • + 1799 @@ -4364,8 +4364,8 @@

  • -
  • - 1795 +
  • + 1798 @@ -4375,8 +4375,8 @@

  • -
  • - 1795 +
  • + 1798 @@ -4397,8 +4397,8 @@

  • -
  • - 1795 +
  • + 1798 @@ -4441,8 +4441,8 @@

  • -
  • - 2002 +
  • + 2005 @@ -4474,8 +4474,8 @@

  • -
  • - 1798 +
  • + 1801 @@ -4870,8 +4870,8 @@

  • -
  • - 2422 +
  • + 2425 @@ -4969,8 +4969,8 @@

  • -
  • - 2427 +
  • + 2430 @@ -4991,8 +4991,8 @@

  • -
  • - 2427 +
  • + 2430 @@ -5024,8 +5024,8 @@

  • -
  • - 2363 +
  • + 2375 @@ -5046,8 +5046,8 @@

  • -
  • - 2363 +
  • + 2375 @@ -5057,8 +5057,8 @@

  • -
  • - 1202 +
  • + 1214 @@ -5068,8 +5068,8 @@

  • -
  • - 1202 +
  • + 1214 @@ -5112,8 +5112,8 @@

  • -
  • - 64 +
  • + 55 @@ -5145,8 +5145,8 @@

  • -
  • - 2427 +
  • + 2430 @@ -5167,8 +5167,8 @@

  • -
  • - 2427 +
  • + 2430 @@ -5200,8 +5200,8 @@

  • -
  • - 39 +
  • + 30 @@ -5321,8 +5321,8 @@

  • -
  • - 38 +
  • + 29 @@ -5343,8 +5343,8 @@

  • -
  • - 38 +
  • + 29 @@ -5376,8 +5376,8 @@

  • -
  • - 39 +
  • + 30 @@ -5420,8 +5420,8 @@

  • -
  • - 2415 +
  • + 2418 @@ -5827,8 +5827,8 @@

  • -
  • - 2427 +
  • + 2430 @@ -6157,8 +6157,8 @@

  • -
  • - 1202 +
  • + 1214 @@ -6168,8 +6168,8 @@

  • -
  • - 1202 +
  • + 1214 @@ -6223,8 +6223,8 @@

  • -
  • - 1202 +
  • + 1214 @@ -6245,8 +6245,8 @@

  • -
  • - 1201 +
  • + 1213 @@ -9191,7 +9191,7 @@

    app/models/content_object.rb

    - 97.44% + 96.75% lines covered @@ -9200,9 +9200,9 @@

    - 273 relevant lines. - 266 lines covered and - 7 lines missed. + 277 relevant lines. + 268 lines covered and + 9 lines missed.
    @@ -9268,8 +9268,8 @@

  • -
  • - 1106 +
  • + 1107 @@ -9714,23 +9714,12 @@

    - # TODO: temporary superclass method for non-EDM objects to be able to use a standard view for all result types -

  • -
    - -
    -
  • - - - - - nil
  • -
  • +
  • @@ -9741,7 +9730,7 @@

  • -
  • +
  • @@ -9752,7 +9741,7 @@

  • -
  • +
  • 1 @@ -9763,7 +9752,7 @@

  • -
  • +
  • @@ -9774,7 +9763,7 @@

  • -
  • +
  • @@ -9785,7 +9774,7 @@

  • -
  • +
  • @@ -9796,7 +9785,7 @@

  • -
  • +
  • 1 @@ -9807,7 +9796,7 @@

  • -
  • +
  • 210 @@ -9818,7 +9807,7 @@

  • -
  • +
  • @@ -9829,7 +9818,7 @@

  • -
  • +
  • @@ -9840,7 +9829,7 @@

  • -
  • +
  • 1 @@ -9851,7 +9840,7 @@

  • -
  • +
  • 251 @@ -9862,7 +9851,7 @@

  • -
  • +
  • @@ -9873,7 +9862,7 @@

  • -
  • +
  • @@ -9884,7 +9873,7 @@

  • -
  • +
  • 1 @@ -9895,7 +9884,7 @@

  • -
  • +
  • 9 @@ -9906,7 +9895,7 @@

  • -
  • +
  • @@ -9917,7 +9906,7 @@

  • -
  • +
  • @@ -9928,7 +9917,7 @@

  • -
  • +
  • 1 @@ -9939,7 +9928,7 @@

  • -
  • +
  • @@ -9950,7 +9939,7 @@

  • -
  • +
  • @@ -9961,7 +9950,7 @@

  • -
  • +
  • @@ -9972,7 +9961,7 @@

  • -
  • +
  • 1 @@ -9983,7 +9972,7 @@

  • -
  • +
  • 25 @@ -9994,7 +9983,7 @@

  • -
  • +
  • @@ -10005,7 +9994,7 @@

  • -
  • +
  • @@ -10016,7 +10005,7 @@

  • -
  • +
  • 1 @@ -10027,7 +10016,7 @@

  • -
  • +
  • 4 @@ -10038,7 +10027,7 @@

  • -
  • +
  • @@ -10049,7 +10038,7 @@

  • -
  • +
  • 2 @@ -10060,7 +10049,7 @@

  • -
  • +
  • @@ -10071,7 +10060,7 @@

  • -
  • +
  • @@ -10082,7 +10071,7 @@

  • -
  • +
  • 1 @@ -10093,7 +10082,7 @@

  • -
  • +
  • 600 @@ -10104,7 +10093,7 @@

  • -
  • +
  • @@ -10115,7 +10104,7 @@

  • -
  • +
  • @@ -10126,7 +10115,7 @@

  • -
  • +
  • 1 @@ -10137,7 +10126,7 @@

  • -
  • +
  • 54 @@ -10148,7 +10137,7 @@

  • -
  • +
  • @@ -10159,7 +10148,7 @@

  • -
  • +
  • @@ -10170,7 +10159,7 @@

  • -
  • +
  • 1 @@ -10181,7 +10170,7 @@

  • -
  • +
  • @@ -10192,7 +10181,7 @@

  • -
  • +
  • @@ -10203,7 +10192,7 @@

  • -
  • +
  • @@ -10214,7 +10203,7 @@

  • -
  • +
  • 1 @@ -10225,7 +10214,7 @@

  • -
  • +
  • 7 @@ -10236,7 +10225,7 @@

  • -
  • +
  • @@ -10247,7 +10236,7 @@

  • -
  • +
  • @@ -10258,7 +10247,7 @@

  • -
  • +
  • 1 @@ -10269,7 +10258,7 @@

  • -
  • +
  • @@ -10280,7 +10269,7 @@

  • -
  • +
  • 4 @@ -10291,7 +10280,7 @@

  • -
  • +
  • @@ -10302,7 +10291,7 @@

  • -
  • +
  • @@ -10313,7 +10302,7 @@

  • -
  • +
  • 1 @@ -10324,7 +10313,7 @@

  • -
  • +
  • @@ -10335,7 +10324,7 @@

  • -
  • +
  • 4 @@ -10346,7 +10335,7 @@

  • -
  • +
  • @@ -10357,7 +10346,7 @@

  • -
  • +
  • @@ -10368,7 +10357,7 @@

  • -
  • +
  • 1 @@ -10379,7 +10368,7 @@

  • -
  • +
  • @@ -10390,7 +10379,7 @@

  • -
  • +
  • 3 @@ -10401,7 +10390,7 @@

  • -
  • +
  • @@ -10412,7 +10401,7 @@

  • -
  • +
  • @@ -10423,7 +10412,7 @@

  • -
  • +
  • 1 @@ -10434,7 +10423,7 @@

  • -
  • +
  • 55 @@ -10445,7 +10434,7 @@

  • -
  • +
  • @@ -10456,7 +10445,7 @@

  • -
  • +
  • @@ -10467,7 +10456,7 @@

  • -
  • +
  • 1 @@ -10478,7 +10467,7 @@

  • -
  • +
  • 360 @@ -10489,7 +10478,7 @@

  • -
  • +
  • @@ -10500,7 +10489,7 @@

  • -
  • +
  • @@ -10511,7 +10500,7 @@

  • -
  • +
  • 1 @@ -10522,7 +10511,7 @@

  • -
  • +
  • 1067 @@ -10533,7 +10522,7 @@

  • -
  • +
  • 1067 @@ -10544,7 +10533,7 @@

  • -
  • +
  • @@ -10555,7 +10544,7 @@

  • -
  • +
  • 1067 @@ -10566,7 +10555,7 @@

  • -
  • +
  • @@ -10577,7 +10566,7 @@

  • -
  • +
  • @@ -10588,7 +10577,7 @@

  • -
  • +
  • 1 @@ -10599,7 +10588,7 @@

  • -
  • +
  • 157 @@ -10610,7 +10599,7 @@

  • -
  • +
  • @@ -10621,7 +10610,7 @@

  • -
  • +
  • @@ -10632,7 +10621,7 @@

  • -
  • +
  • 1 @@ -10643,7 +10632,7 @@

  • -
  • +
  • 3 @@ -10654,7 +10643,7 @@

  • -
  • +
  • @@ -10665,7 +10654,7 @@

  • -
  • +
  • @@ -10676,7 +10665,7 @@

  • -
  • +
  • 1 @@ -10687,7 +10676,7 @@

  • -
  • +
  • 5 @@ -10698,7 +10687,7 @@

  • -
  • +
  • @@ -10709,7 +10698,7 @@

  • -
  • +
  • @@ -10720,7 +10709,7 @@

  • -
  • +
  • 1 @@ -10731,7 +10720,7 @@

  • -
  • +
  • 57 @@ -10742,7 +10731,7 @@

  • -
  • +
  • @@ -10753,7 +10742,7 @@

  • -
  • +
  • @@ -10764,7 +10753,7 @@

  • -
  • +
  • 1 @@ -10775,7 +10764,7 @@

  • -
  • +
  • 714 @@ -10786,7 +10775,7 @@

  • -
  • +
  • 714 @@ -10797,7 +10786,7 @@

  • -
  • +
  • @@ -10808,7 +10797,7 @@

  • -
  • +
  • 714 @@ -10819,7 +10808,7 @@

  • -
  • +
  • @@ -10830,7 +10819,7 @@

  • -
  • +
  • @@ -10841,7 +10830,7 @@

  • -
  • +
  • 1 @@ -10852,7 +10841,7 @@

  • -
  • +
  • @@ -10863,7 +10852,7 @@

  • -
  • +
  • @@ -10874,7 +10863,7 @@

  • -
  • +
  • @@ -10885,7 +10874,7 @@

  • -
  • +
  • @@ -10896,7 +10885,7 @@

  • -
  • +
  • 160 @@ -10907,7 +10896,7 @@

  • -
  • +
  • 158 @@ -10918,7 +10907,7 @@

  • -
  • +
  • @@ -10929,7 +10918,7 @@

  • -
  • +
  • 6 @@ -10940,7 +10929,7 @@

  • -
  • +
  • @@ -10951,7 +10940,7 @@

  • -
  • +
  • @@ -10962,7 +10951,7 @@

  • -
  • +
  • @@ -10973,7 +10962,7 @@

  • -
  • +
  • 1 @@ -10984,7 +10973,7 @@

  • -
  • +
  • 3 @@ -10995,7 +10984,7 @@

  • -
  • +
  • @@ -11006,7 +10995,7 @@

  • -
  • +
  • @@ -11017,7 +11006,7 @@

  • -
  • +
  • 1 @@ -11028,7 +11017,7 @@

  • -
  • +
  • 164 @@ -11039,7 +11028,7 @@

  • -
  • +
  • @@ -11050,7 +11039,7 @@

  • -
  • +
  • @@ -11061,7 +11050,7 @@

  • -
  • +
  • 1 @@ -11072,7 +11061,7 @@

  • -
  • +
  • 3 @@ -11083,7 +11072,7 @@

  • -
  • +
  • @@ -11094,7 +11083,7 @@

  • -
  • +
  • @@ -11105,7 +11094,7 @@

  • -
  • +
  • 1 @@ -11116,7 +11105,7 @@

  • -
  • +
  • 12 @@ -11127,7 +11116,7 @@

  • -
  • +
  • @@ -11138,7 +11127,7 @@

  • -
  • +
  • @@ -11149,7 +11138,7 @@

  • -
  • +
  • 1 @@ -11160,7 +11149,7 @@

  • -
  • +
  • 12 @@ -11171,7 +11160,7 @@

  • -
  • +
  • @@ -11182,7 +11171,7 @@

  • -
  • +
  • @@ -11193,7 +11182,7 @@

  • -
  • +
  • 1 @@ -11204,7 +11193,7 @@

  • -
  • +
  • 174 @@ -11215,7 +11204,7 @@

  • -
  • +
  • @@ -11226,7 +11215,7 @@

  • -
  • +
  • @@ -11237,7 +11226,7 @@

  • -
  • +
  • 1 @@ -11248,7 +11237,7 @@

  • -
  • +
  • 371 @@ -11259,7 +11248,7 @@

  • -
  • +
  • @@ -11270,7 +11259,7 @@

  • -
  • +
  • @@ -11281,7 +11270,7 @@

  • -
  • +
  • 1 @@ -11292,18 +11281,18 @@

  • -
  • +
  • 109 - get_first_from('primarySponsorParty_ses') + get_all_from('primarySponsorParty_ses')
  • -
  • +
  • @@ -11314,7 +11303,7 @@

  • -
  • +
  • @@ -11325,7 +11314,7 @@

  • -
  • +
  • 1 @@ -11336,7 +11325,7 @@

  • -
  • +
  • 217 @@ -11347,7 +11336,7 @@

  • -
  • +
  • @@ -11358,7 +11347,7 @@

  • -
  • +
  • @@ -11369,7 +11358,7 @@

  • -
  • +
  • 1 @@ -11380,7 +11369,7 @@

  • -
  • +
  • 158 @@ -11391,7 +11380,7 @@

  • -
  • +
  • @@ -11402,7 +11391,7 @@

  • -
  • +
  • @@ -11413,7 +11402,7 @@

  • -
  • +
  • 1 @@ -11424,7 +11413,7 @@

  • -
  • +
  • 3034 @@ -11435,7 +11424,7 @@

  • -
  • +
  • @@ -11446,7 +11435,7 @@

  • -
  • +
  • @@ -11457,7 +11446,7 @@

  • -
  • +
  • 1 @@ -11468,7 +11457,7 @@

  • -
  • +
  • 606 @@ -11479,7 +11468,7 @@

  • -
  • +
  • 606 @@ -11490,7 +11479,7 @@

  • -
  • +
  • @@ -11501,7 +11490,7 @@

  • -
  • +
  • 600 @@ -11512,7 +11501,7 @@

  • -
  • +
  • @@ -11523,7 +11512,7 @@

  • -
  • +
  • @@ -11534,7 +11523,7 @@

  • -
  • +
  • 1 @@ -11545,7 +11534,7 @@

  • -
  • +
  • 869 @@ -11556,7 +11545,7 @@

  • -
  • +
  • @@ -11567,7 +11556,7 @@

  • -
  • +
  • @@ -11578,7 +11567,7 @@

  • -
  • +
  • 1 @@ -11589,7 +11578,7 @@

  • -
  • +
  • 306 @@ -11600,7 +11589,7 @@

  • -
  • +
  • @@ -11611,7 +11600,7 @@

  • -
  • +
  • @@ -11622,7 +11611,7 @@

  • -
  • +
  • 1 @@ -11633,7 +11622,7 @@

  • -
  • +
  • 200 @@ -11644,7 +11633,7 @@

  • -
  • +
  • @@ -11655,7 +11644,7 @@

  • -
  • +
  • @@ -11666,7 +11655,7 @@

  • -
  • +
  • 1 @@ -11677,7 +11666,7 @@

  • -
  • +
  • 606 @@ -11688,7 +11677,7 @@

  • -
  • +
  • @@ -11699,7 +11688,7 @@

  • -
  • +
  • 600 @@ -11710,7 +11699,7 @@

  • -
  • +
  • @@ -11721,7 +11710,7 @@

  • -
  • +
  • @@ -11732,7 +11721,7 @@

  • -
  • +
  • 1 @@ -11743,7 +11732,7 @@

  • -
  • +
  • 863 @@ -11754,7 +11743,7 @@

  • -
  • +
  • @@ -11765,7 +11754,7 @@

  • -
  • +
  • @@ -11776,7 +11765,7 @@

  • -
  • +
  • 1 @@ -11787,7 +11776,7 @@

  • -
  • +
  • 3 @@ -11798,7 +11787,7 @@

  • -
  • +
  • @@ -11809,7 +11798,7 @@

  • -
  • +
  • @@ -11820,7 +11809,7 @@

  • -
  • +
  • 1 @@ -11831,7 +11820,7 @@

  • -
  • +
  • 3 @@ -11842,7 +11831,7 @@

  • -
  • +
  • @@ -11853,7 +11842,7 @@

  • -
  • +
  • @@ -11864,7 +11853,7 @@

  • -
  • +
  • 1 @@ -11875,7 +11864,7 @@

  • -
  • +
  • 860 @@ -11886,7 +11875,7 @@

  • -
  • +
  • @@ -11897,7 +11886,7 @@

  • -
  • +
  • @@ -11908,7 +11897,7 @@

  • -
  • +
  • 1 @@ -11919,7 +11908,7 @@

  • -
  • +
  • @@ -11930,7 +11919,7 @@

  • -
  • +
  • 208 @@ -11941,7 +11930,7 @@

  • -
  • +
  • @@ -11952,7 +11941,7 @@

  • -
  • +
  • @@ -11963,7 +11952,7 @@

  • -
  • +
  • 1 @@ -11974,7 +11963,7 @@

  • -
  • +
  • 166 @@ -11985,7 +11974,7 @@

  • -
  • +
  • @@ -11996,7 +11985,7 @@

  • -
  • +
  • @@ -12007,7 +11996,7 @@

  • -
  • +
  • 1 @@ -12018,7 +12007,7 @@

  • -
  • +
  • 632 @@ -12029,7 +12018,7 @@

  • -
  • +
  • @@ -12040,7 +12029,7 @@

  • -
  • +
  • @@ -12051,7 +12040,7 @@

  • -
  • +
  • 1 @@ -12062,7 +12051,7 @@

  • -
  • +
  • 3 @@ -12073,7 +12062,7 @@

  • -
  • +
  • @@ -12084,7 +12073,7 @@

  • -
  • +
  • @@ -12095,7 +12084,7 @@

  • -
  • +
  • 1 @@ -12106,7 +12095,7 @@

  • -
  • +
  • 3 @@ -12117,7 +12106,7 @@

  • -
  • +
  • @@ -12128,7 +12117,7 @@

  • -
  • +
  • @@ -12139,7 +12128,7 @@

  • -
  • +
  • 1 @@ -12150,7 +12139,7 @@

  • -
  • +
  • 308 @@ -12161,7 +12150,7 @@

  • -
  • +
  • @@ -12172,7 +12161,7 @@

  • -
  • +
  • @@ -12183,7 +12172,7 @@

  • -
  • +
  • 1 @@ -12194,7 +12183,7 @@

  • -
  • +
  • 51 @@ -12205,7 +12194,7 @@

  • -
  • +
  • @@ -12216,7 +12205,7 @@

  • -
  • +
  • @@ -12227,7 +12216,7 @@

  • -
  • +
  • 1 @@ -12238,7 +12227,7 @@

  • -
  • +
  • 51 @@ -12249,7 +12238,7 @@

  • -
  • +
  • @@ -12260,7 +12249,7 @@

  • -
  • +
  • @@ -12271,7 +12260,7 @@

  • -
  • +
  • 1 @@ -12282,7 +12271,7 @@

  • -
  • +
  • 3 @@ -12293,7 +12282,7 @@

  • -
  • +
  • @@ -12304,7 +12293,7 @@

  • -
  • +
  • @@ -12315,7 +12304,7 @@

  • -
  • +
  • 1 @@ -12326,7 +12315,7 @@

  • -
  • +
  • 154 @@ -12337,7 +12326,7 @@

  • -
  • +
  • @@ -12348,7 +12337,7 @@

  • -
  • +
  • @@ -12359,7 +12348,7 @@

  • -
  • +
  • 1 @@ -12370,7 +12359,7 @@

  • -
  • +
  • 103 @@ -12380,6 +12369,17 @@

  • +
    +
  • + + + + + + end +
  • +
    +
  • @@ -12387,12 +12387,45 @@

    + +

  • +
    + +
    +
  • + 1 + + + + + def member_parties +
  • +
    + +
    +
  • + + + + + + get_all_from('memberParty_ses') +
  • +
    + +
    +
  • + + + + + end
  • -
  • +
  • @@ -12403,7 +12436,7 @@

  • -
  • +
  • 1 @@ -12414,7 +12447,7 @@

  • -
  • +
  • 4 @@ -12425,7 +12458,7 @@

  • -
  • +
  • @@ -12436,7 +12469,7 @@

  • -
  • +
  • @@ -12447,7 +12480,7 @@

  • -
  • +
  • 1 @@ -12458,7 +12491,7 @@

  • -
  • +
  • 3 @@ -12469,7 +12502,7 @@

  • -
  • +
  • @@ -12480,7 +12513,7 @@

  • -
  • +
  • @@ -12491,7 +12524,7 @@

  • -
  • +
  • 1 @@ -12502,7 +12535,7 @@

  • -
  • +
  • 3 @@ -12513,7 +12546,51 @@

  • -
  • +
  • + + + + + + end +
  • +
    + +
    +
  • + + + + + + +
  • +
    + +
    +
  • + 1 + + + + + def asking_member_parties +
  • +
    + +
    +
  • + + + + + + get_all_from('askingMemberParty_ses') +
  • +
    + +
    +
  • @@ -12524,7 +12601,7 @@

  • -
  • +
  • @@ -12535,7 +12612,7 @@

  • -
  • +
  • 1 @@ -12546,7 +12623,7 @@

  • -
  • +
  • 3 @@ -12557,7 +12634,7 @@

  • -
  • +
  • @@ -12568,7 +12645,7 @@

  • -
  • +
  • @@ -12579,7 +12656,7 @@

  • -
  • +
  • 1 @@ -12590,7 +12667,7 @@

  • -
  • +
  • 3 @@ -12601,7 +12678,7 @@

  • -
  • +
  • @@ -12612,7 +12689,7 @@

  • -
  • +
  • @@ -12623,7 +12700,7 @@

  • -
  • +
  • 1 @@ -12634,7 +12711,7 @@

  • -
  • +
  • 3 @@ -12645,7 +12722,7 @@

  • -
  • +
  • @@ -12656,7 +12733,7 @@

  • -
  • +
  • @@ -12667,7 +12744,7 @@

  • -
  • +
  • 1 @@ -12678,7 +12755,7 @@

  • -
  • +
  • 7 @@ -12689,7 +12766,7 @@

  • -
  • +
  • @@ -12700,7 +12777,7 @@

  • -
  • +
  • @@ -12711,7 +12788,7 @@

  • -
  • +
  • 1 @@ -12722,7 +12799,7 @@

  • -
  • +
  • 3 @@ -12733,7 +12810,7 @@

  • -
  • +
  • @@ -12744,7 +12821,7 @@

  • -
  • +
  • @@ -12755,7 +12832,7 @@

  • -
  • +
  • 1 @@ -12766,7 +12843,7 @@

  • -
  • +
  • @@ -12777,7 +12854,7 @@

  • -
  • +
  • @@ -12788,7 +12865,7 @@

  • -
  • +
  • 206 @@ -12799,7 +12876,7 @@

  • -
  • +
  • 206 @@ -12810,7 +12887,7 @@

  • -
  • +
  • 206 @@ -12821,7 +12898,7 @@

  • -
  • +
  • @@ -12832,7 +12909,7 @@

  • -
  • +
  • 206 @@ -12843,7 +12920,7 @@

  • -
  • +
  • @@ -12854,7 +12931,7 @@

  • -
  • +
  • 157 @@ -12865,7 +12942,7 @@

  • -
  • +
  • @@ -12876,7 +12953,7 @@

  • -
  • +
  • 154 @@ -12887,7 +12964,7 @@

  • -
  • +
  • @@ -12898,7 +12975,7 @@

  • -
  • +
  • 137 @@ -12909,7 +12986,7 @@

  • -
  • +
  • @@ -12920,7 +12997,7 @@

  • -
  • +
  • @@ -12931,7 +13008,7 @@

  • -
  • +
  • 1 @@ -12942,7 +13019,7 @@

  • -
  • +
  • @@ -12953,7 +13030,7 @@

  • -
  • +
  • 373 @@ -12964,7 +13041,7 @@

  • -
  • +
  • @@ -12975,7 +13052,7 @@

  • -
  • +
  • @@ -12986,7 +13063,7 @@

  • -
  • +
  • 1 @@ -12997,7 +13074,7 @@

  • -
  • +
  • 1 @@ -13008,7 +13085,7 @@

  • -
  • +
  • @@ -13019,7 +13096,7 @@

  • -
  • +
  • @@ -13030,7 +13107,7 @@

  • -
  • +
  • 1 @@ -13041,7 +13118,7 @@

  • -
  • +
  • 1 @@ -13052,7 +13129,7 @@

  • -
  • +
  • @@ -13063,7 +13140,7 @@

  • -
  • +
  • @@ -13074,7 +13151,7 @@

  • -
  • +
  • 1 @@ -13085,7 +13162,7 @@

  • -
  • +
  • @@ -13096,7 +13173,7 @@

  • -
  • +
  • @@ -13107,7 +13184,7 @@

  • -
  • +
  • @@ -13118,7 +13195,7 @@

  • -
  • +
  • 1 @@ -13129,7 +13206,7 @@

  • -
  • +
  • @@ -13140,7 +13217,7 @@

  • -
  • +
  • 9 @@ -13151,7 +13228,7 @@

  • -
  • +
  • @@ -13162,7 +13239,7 @@

  • -
  • +
  • @@ -13173,7 +13250,7 @@

  • -
  • +
  • 1 @@ -13184,7 +13261,7 @@

  • -
  • +
  • @@ -13195,7 +13272,7 @@

  • -
  • +
  • 9 @@ -13206,7 +13283,7 @@

  • -
  • +
  • @@ -13217,7 +13294,7 @@

  • -
  • +
  • @@ -13228,7 +13305,7 @@

  • -
  • +
  • 1 @@ -13239,7 +13316,7 @@

  • -
  • +
  • @@ -13250,7 +13327,7 @@

  • -
  • +
  • 1 @@ -13261,7 +13338,7 @@

  • -
  • +
  • 3038 @@ -13272,7 +13349,7 @@

  • -
  • +
  • @@ -13283,7 +13360,7 @@

  • -
  • +
  • 3016 @@ -13294,7 +13371,7 @@

  • -
  • +
  • @@ -13305,7 +13382,7 @@

  • -
  • +
  • @@ -13316,7 +13393,7 @@

  • -
  • +
  • 1 @@ -13327,7 +13404,7 @@

  • -
  • +
  • 1381 @@ -13338,7 +13415,7 @@

  • -
  • +
  • @@ -13349,7 +13426,7 @@

  • -
  • +
  • 658 @@ -13360,7 +13437,7 @@

  • -
  • +
  • 658 @@ -13371,7 +13448,7 @@

  • -
  • +
  • @@ -13382,7 +13459,7 @@

  • -
  • +
  • @@ -13393,7 +13470,7 @@

  • -
  • +
  • 1 @@ -13404,8 +13481,8 @@

  • -
  • - 6166 +
  • + 6057 @@ -13415,7 +13492,7 @@

  • -
  • +
  • @@ -13426,8 +13503,8 @@

  • -
  • - 4110 +
  • + 4010 @@ -13437,7 +13514,7 @@

  • -
  • +
  • @@ -13448,7 +13525,7 @@

  • -
  • +
  • @@ -13459,7 +13536,7 @@

  • -
  • +
  • 1 @@ -13470,7 +13547,7 @@

  • -
  • +
  • 556 @@ -13481,7 +13558,7 @@

  • -
  • +
  • @@ -13492,7 +13569,7 @@

  • -
  • +
  • 13 @@ -13503,7 +13580,7 @@

  • -
  • +
  • @@ -13514,7 +13591,7 @@

  • -
  • +
  • @@ -13525,7 +13602,7 @@

  • -
  • +
  • 1 @@ -13536,7 +13613,7 @@

  • -
  • +
  • 641 @@ -13547,7 +13624,7 @@

  • -
  • +
  • @@ -13558,7 +13635,7 @@

  • -
  • +
  • 92 @@ -13569,7 +13646,7 @@

  • -
  • +
  • @@ -13580,7 +13657,7 @@

  • -
  • +
  • @@ -13591,7 +13668,7 @@

  • -
  • +
  • 1 @@ -13602,7 +13679,7 @@

  • -
  • +
  • 420 @@ -13613,7 +13690,7 @@

  • -
  • +
  • @@ -13624,7 +13701,7 @@

  • -
  • +
  • 405 @@ -13635,7 +13712,7 @@

  • -
  • +
  • @@ -13646,7 +13723,7 @@

  • -
  • +
  • @@ -13657,7 +13734,7 @@

  • -
  • +
  • 1 @@ -13668,7 +13745,7 @@

  • -
  • +
  • 7 @@ -13679,7 +13756,7 @@

  • -
  • +
  • @@ -13690,7 +13767,7 @@

  • -
  • +
  • 4 @@ -13701,7 +13778,7 @@

  • -
  • +
  • @@ -13712,7 +13789,7 @@

  • -
  • +
  • @@ -13723,7 +13800,7 @@

  • -
  • +
  • 1 @@ -13734,7 +13811,7 @@

  • -
  • +
  • @@ -13745,7 +13822,7 @@

  • -
  • +
  • 386 @@ -13756,7 +13833,7 @@

  • -
  • +
  • @@ -13767,7 +13844,7 @@

  • -
  • +
  • 273 @@ -13778,7 +13855,7 @@

  • -
  • +
  • 273 @@ -13789,7 +13866,7 @@

  • -
  • +
  • @@ -13800,7 +13877,7 @@

  • -
  • +
  • 247 @@ -13811,7 +13888,7 @@

  • -
  • +
  • @@ -13822,7 +13899,7 @@

  • -
  • +
  • @@ -13833,7 +13910,7 @@

  • -
  • +
  • 1 @@ -13844,7 +13921,7 @@

  • -
  • +
  • @@ -13855,7 +13932,7 @@

  • -
  • +
  • 582 @@ -13866,7 +13943,7 @@

  • -
  • +
  • @@ -13877,7 +13954,7 @@

  • -
  • +
  • 559 @@ -13888,7 +13965,7 @@

  • -
  • +
  • 559 @@ -13899,7 +13976,7 @@

  • -
  • +
  • @@ -13910,7 +13987,7 @@

  • -
  • +
  • 556 @@ -13921,7 +13998,7 @@

  • -
  • +
  • @@ -13932,7 +14009,7 @@

  • -
  • +
  • @@ -13943,7 +14020,7 @@

  • -
  • +
  • 1 @@ -13954,7 +14031,7 @@

  • -
  • +
  • @@ -13965,7 +14042,7 @@

  • -
  • +
  • @@ -13976,7 +14053,7 @@

  • -
  • +
  • @@ -13987,7 +14064,7 @@

  • -
  • +
  • @@ -13998,8 +14075,8 @@

  • -
  • - 5859 +
  • + 5968 @@ -14009,7 +14086,7 @@

  • -
  • +
  • @@ -14020,8 +14097,8 @@

  • -
  • - 16686 +
  • + 16892 @@ -14031,7 +14108,7 @@

  • -
  • +
  • @@ -14042,7 +14119,7 @@

  • -
  • +
  • @@ -14053,7 +14130,7 @@

  • -
  • +
  • 1 @@ -14064,7 +14141,7 @@

  • -
  • +
  • 135 @@ -14075,7 +14152,7 @@

  • -
  • +
  • @@ -14086,7 +14163,7 @@

  • -
  • +
  • @@ -14097,7 +14174,7 @@

  • -
  • +
  • @@ -14108,7 +14185,7 @@

  • -
  • +
  • 31 @@ -14119,7 +14196,7 @@

  • -
  • +
  • @@ -14130,7 +14207,7 @@

  • -
  • +
  • 13 @@ -14141,7 +14218,7 @@

  • -
  • +
  • @@ -14152,7 +14229,7 @@

  • -
  • +
  • 1 @@ -14163,7 +14240,7 @@

  • -
  • +
  • @@ -14174,7 +14251,7 @@

  • -
  • +
  • 1 @@ -14185,7 +14262,7 @@

  • -
  • +
  • @@ -14196,7 +14273,7 @@

  • -
  • +
  • 1 @@ -14207,7 +14284,7 @@

  • -
  • +
  • @@ -14218,7 +14295,7 @@

  • -
  • +
  • 1 @@ -14229,7 +14306,7 @@

  • -
  • +
  • @@ -14240,7 +14317,7 @@

  • -
  • +
  • 1 @@ -14251,7 +14328,7 @@

  • -
  • +
  • @@ -14262,7 +14339,7 @@

  • -
  • +
  • 1 @@ -14273,7 +14350,7 @@

  • -
  • +
  • @@ -14284,7 +14361,7 @@

  • -
  • +
  • 1 @@ -14295,7 +14372,7 @@

  • -
  • +
  • @@ -14306,7 +14383,7 @@

  • -
  • +
  • 1 @@ -14317,7 +14394,7 @@

  • -
  • +
  • @@ -14328,7 +14405,7 @@

  • -
  • +
  • 1 @@ -14339,7 +14416,7 @@

  • -
  • +
  • @@ -14350,7 +14427,7 @@

  • -
  • +
  • 1 @@ -14361,7 +14438,7 @@

  • -
  • +
  • @@ -14372,7 +14449,7 @@

  • -
  • +
  • 3 @@ -14383,7 +14460,7 @@

  • -
  • +
  • 1 @@ -14394,7 +14471,7 @@

  • -
  • +
  • 2 @@ -14405,7 +14482,7 @@

  • -
  • +
  • 1 @@ -14416,7 +14493,7 @@

  • -
  • +
  • @@ -14427,7 +14504,7 @@

  • -
  • +
  • 1 @@ -14438,7 +14515,7 @@

  • -
  • +
  • @@ -14449,7 +14526,7 @@

  • -
  • +
  • @@ -14460,7 +14537,7 @@

  • -
  • +
  • 1 @@ -14471,7 +14548,7 @@

  • -
  • +
  • @@ -14482,7 +14559,7 @@

  • -
  • +
  • @@ -14493,7 +14570,7 @@

  • -
  • +
  • 1 @@ -14504,7 +14581,7 @@

  • -
  • +
  • @@ -14515,7 +14592,7 @@

  • -
  • +
  • @@ -14526,7 +14603,7 @@

  • -
  • +
  • 1 @@ -14537,7 +14614,7 @@

  • -
  • +
  • @@ -14548,7 +14625,7 @@

  • -
  • +
  • @@ -14559,7 +14636,7 @@

  • -
  • +
  • 1 @@ -14570,7 +14647,7 @@

  • -
  • +
  • @@ -14581,7 +14658,7 @@

  • -
  • +
  • @@ -14592,7 +14669,7 @@

  • -
  • +
  • 1 @@ -14603,7 +14680,7 @@

  • -
  • +
  • @@ -14614,7 +14691,7 @@

  • -
  • +
  • @@ -14625,7 +14702,7 @@

  • -
  • +
  • 1 @@ -14636,7 +14713,7 @@

  • -
  • +
  • @@ -14647,7 +14724,7 @@

  • -
  • +
  • @@ -14658,7 +14735,7 @@

  • -
  • +
  • 1 @@ -14669,7 +14746,7 @@

  • -
  • +
  • @@ -14680,7 +14757,7 @@

  • -
  • +
  • 4 @@ -14691,7 +14768,7 @@

  • -
  • +
  • 1 @@ -14702,7 +14779,7 @@

  • -
  • +
  • 3 @@ -14713,7 +14790,7 @@

  • -
  • +
  • 1 @@ -14724,7 +14801,7 @@

  • -
  • +
  • 2 @@ -14735,7 +14812,7 @@

  • -
  • +
  • 1 @@ -14746,7 +14823,7 @@

  • -
  • +
  • 1 @@ -14757,7 +14834,7 @@

  • -
  • +
  • @@ -14768,7 +14845,7 @@

  • -
  • +
  • 1 @@ -14779,7 +14856,7 @@

  • -
  • +
  • @@ -14790,7 +14867,7 @@

  • -
  • +
  • @@ -14801,7 +14878,7 @@

  • -
  • +
  • @@ -14812,7 +14889,7 @@

  • -
  • +
  • @@ -14823,7 +14900,7 @@

  • -
  • +
  • 1 @@ -14834,7 +14911,7 @@

  • -
  • +
  • @@ -14845,7 +14922,7 @@

  • -
  • +
  • 1 @@ -14856,7 +14933,7 @@

  • -
  • +
  • @@ -14867,7 +14944,7 @@

  • -
  • +
  • 1 @@ -14878,7 +14955,7 @@

  • -
  • +
  • @@ -14889,7 +14966,7 @@

  • -
  • +
  • 1 @@ -14900,7 +14977,7 @@

  • -
  • +
  • @@ -14911,7 +14988,7 @@

  • -
  • +
  • @@ -14922,7 +14999,7 @@

  • -
  • +
  • 1 @@ -14933,7 +15010,7 @@

  • -
  • +
  • @@ -14944,7 +15021,7 @@

  • -
  • +
  • @@ -14955,7 +15032,7 @@

  • -
  • +
  • 1 @@ -14966,7 +15043,7 @@

  • -
  • +
  • @@ -14977,7 +15054,7 @@

  • -
  • +
  • 1 @@ -14988,7 +15065,7 @@

  • -
  • +
  • @@ -14999,7 +15076,7 @@

  • -
  • +
  • 1 @@ -15010,7 +15087,7 @@

  • -
  • +
  • @@ -15021,7 +15098,7 @@

  • -
  • +
  • 1 @@ -15032,7 +15109,7 @@

  • -
  • +
  • @@ -15043,7 +15120,7 @@

  • -
  • +
  • 1 @@ -15054,7 +15131,7 @@

  • -
  • +
  • @@ -15065,7 +15142,7 @@

  • -
  • +
  • 1 @@ -15076,7 +15153,7 @@

  • -
  • +
  • @@ -15087,7 +15164,7 @@

  • -
  • +
  • 1 @@ -15098,7 +15175,7 @@

  • -
  • +
  • @@ -15109,7 +15186,7 @@

  • -
  • +
  • 1 @@ -15120,7 +15197,7 @@

  • -
  • +
  • @@ -15131,7 +15208,7 @@

  • -
  • +
  • 54 @@ -15142,7 +15219,7 @@

  • -
  • +
  • @@ -15153,7 +15230,7 @@

  • -
  • +
  • @@ -15164,7 +15241,7 @@

  • -
  • +
  • @@ -15175,7 +15252,7 @@

  • -
  • +
  • 1 @@ -15186,7 +15263,7 @@

  • -
  • +
  • @@ -15197,7 +15274,7 @@

  • -
  • +
  • @@ -15208,7 +15285,7 @@

  • -
  • +
  • @@ -15219,7 +15296,7 @@

  • -
  • +
  • 832 @@ -15230,7 +15307,7 @@

  • -
  • +
  • @@ -15241,7 +15318,7 @@

  • -
  • +
  • 29 @@ -15252,7 +15329,7 @@

  • -
  • +
  • @@ -15263,7 +15340,7 @@

  • -
  • +
  • @@ -15274,7 +15351,7 @@

  • -
  • +
  • 803 @@ -15285,7 +15362,7 @@

  • -
  • +
  • @@ -15296,7 +15373,7 @@

  • -
  • +
  • @@ -15307,7 +15384,7 @@

  • -
  • +
  • 1 @@ -15318,7 +15395,7 @@

  • -
  • +
  • 2488 @@ -15329,7 +15406,7 @@

  • -
  • +
  • @@ -15340,7 +15417,7 @@

  • -
  • +
  • 1672 @@ -15351,7 +15428,7 @@

  • -
  • +
  • @@ -15362,7 +15439,7 @@

  • -
  • +
  • 158 @@ -15373,7 +15450,7 @@

  • -
  • +
  • @@ -15384,7 +15461,7 @@

  • -
  • +
  • 85 @@ -15395,7 +15472,7 @@

  • -
  • +
  • @@ -15406,7 +15483,7 @@

  • -
  • +
  • @@ -15417,7 +15494,7 @@

  • -
  • +
  • 1 @@ -15428,7 +15505,7 @@

  • -
  • +
  • 1176 @@ -15439,7 +15516,7 @@

  • -
  • +
  • @@ -15450,7 +15527,7 @@

  • -
  • +
  • @@ -15461,7 +15538,7 @@

  • -
  • +
  • @@ -16117,7 +16194,7 @@

    app/models/edm.rb

    - 96.55% + 97.3% lines covered @@ -16126,8 +16203,8 @@

    - 29 relevant lines. - 28 lines covered and + 37 relevant lines. + 36 lines covered and 1 lines missed.
    @@ -16172,8 +16249,8 @@

  • -
  • - 133 +
  • + 134 @@ -16381,101 +16458,101 @@

  • -
  • - 70 +
  • + - return if content_object_data['amendmentText_t'].blank? + original_hash = {
  • -
  • - 18 +
  • + 142 - return if content_object_data['amendment_numberOfSignatures_s'].blank? + text: content_object_data['amendmentText_t'].blank? ? {} : { value: content_object_data['amendmentText_t'], field_name: 'amendmentText_t' },
  • -
  • - 18 +
  • + 71 - return if content_object_data['amendment_primarySponsorPrinted_t'].blank? + number_of_signatures: content_object_data['amendment_numberOfSignatures_s'].blank? ? {} : { value: content_object_data['amendment_numberOfSignatures_s'], field_name: 'amendment_numberOfSignatures_s' },
  • -
  • - 18 +
  • + 71 - return if content_object_data['amendment_primarySponsorParty_ses'].blank? + primary_sponsor: content_object_data['amendment_primarySponsor_ses'].blank? ? {} : { value: content_object_data['amendment_primarySponsor_ses'], field_name: 'amendment_primarySponsor_ses' },
  • -
  • - 18 +
  • + 71 - return if content_object_data['identifier_t'].blank? + primary_sponsor_text: content_object_data['amendment_primarySponsorPrinted_t'].blank? ? {} : { value: content_object_data['amendment_primarySponsorPrinted_t'], field_name: 'amendment_primarySponsorPrinted_t' },
  • -
  • - 18 +
  • + 71 - return if content_object_data['amendment_dateTabled_dt'].blank? + primary_sponsor_party: content_object_data['amendment_primarySponsorParty_ses'].blank? ? {} : { value: content_object_data['amendment_primarySponsorParty_ses'], field_name: 'amendment_primarySponsorParty_ses' },
  • -
  • - +
  • + 71 - + reference: content_object_data['identifier_t']&.drop(1).blank? ? {} : { value: content_object_data['identifier_t']&.drop(1), field_name: 'identifier_t' },
  • -
  • - +
  • + 71 - original_hash = { + date_tabled: content_object_data['amendment_dateTabled_dt'].blank? ? {} : { value: content_object_data['amendment_dateTabled_dt'], field_name: 'amendment_dateTabled_dt' }
  • -
  • - 18 +
  • + - text: content_object_data['amendmentText_t'], + }
  • @@ -16486,18 +16563,18 @@

    - number_of_signatures: content_object_data['amendment_numberOfSignatures_s'], +

    -
  • - +
  • + 71 - primary_sponsor: content_object_data['amendment_primarySponsorPrinted_t'], + return [] if original_hash.values.pluck(:value).compact.blank?
  • @@ -16508,40 +16585,40 @@

    - primary_sponsor_party: content_object_data['amendment_primarySponsorParty_ses'], +

    -
  • - +
  • + 19 - reference: content_object_data['identifier_t'].drop(1), + number_of_amendments = original_hash.values.pluck(:value).compact.map(&:size).max
  • -
  • - +
  • + 19 - date_tabled: content_object_data['amendment_dateTabled_dt'], + keys = original_hash.keys
  • -
  • - +
  • + 19 - } + result_hashes = []
  • @@ -16557,46 +16634,46 @@

    -
  • - 18 +
  • + 19 - result_hashes = original_hash[:text].zip( + number_of_amendments.times do |iteration|
  • -
  • - +
  • + 24 - original_hash[:number_of_signatures], + ret = {}
  • -
  • - +
  • + 24 - original_hash[:primary_sponsor], + keys.each do |key|
  • -
  • - +
  • + 168 - original_hash[:primary_sponsor_party], + ret[key] = { value: original_hash.dig(key, :value).blank? ? nil : original_hash.dig(key, :value)[iteration], field_name: original_hash.dig(key, :field_name) }
  • @@ -16607,29 +16684,29 @@

    - original_hash[:reference], + end

    -
  • - +
  • + 24 - original_hash[:date_tabled], + ret[:index] = iteration
  • -
  • - +
  • + 24 - ).map.with_index do |values, index| + result_hashes << ret
  • @@ -16640,111 +16717,12 @@

    - { - -

    - -
    -
  • - 23 - - - - - index: index, -
  • -
    - -
    -
  • - - - - - - text: { value: values[0], field_name: 'amendmentText_t' }, -
  • -
    - -
    -
  • - - - - - - number_of_signatures: { value: values[1], field_name: 'amendment_numberOfSignatures_s' }, -
  • -
    - -
    -
  • - - - - - - primary_sponsor: { value: values[2], field_name: 'amendment_primarySponsorPrinted_t' }, -
  • -
    - -
    -
  • - - - - - - primary_sponsor_party: { value: values[3], field_name: 'amendment_primarySponsorParty_ses' }, -
  • -
    - -
    -
  • - - - - - - reference: { value: values[4], field_name: 'identifier_t' }, -
  • -
    - -
    -
  • - - - - - - date_tabled: { value: values[5]&.to_date, field_name: 'amendment_dateTabled_dt' }, -
  • -
    - -
    -
  • - - - - - - } -
  • -
    - -
    -
  • - - - - - end
  • -
  • +
  • @@ -16755,8 +16733,8 @@

  • -
  • - 18 +
  • + 19 @@ -16766,7 +16744,7 @@

  • -
  • +
  • @@ -16777,7 +16755,7 @@

  • -
  • +
  • @@ -16788,7 +16766,7 @@

  • -
  • +
  • 1 @@ -16799,7 +16777,7 @@

  • -
  • +
  • 55 @@ -16810,7 +16788,7 @@

  • -
  • +
  • @@ -16821,7 +16799,7 @@

  • -
  • +
  • 1 @@ -16832,7 +16810,7 @@

  • -
  • +
  • @@ -16843,7 +16821,7 @@

  • -
  • +
  • @@ -16854,7 +16832,7 @@

  • -
  • +
  • 1 @@ -16865,7 +16843,7 @@

  • -
  • +
  • @@ -16876,7 +16854,7 @@

  • -
  • +
  • 103 @@ -16887,7 +16865,7 @@

  • -
  • +
  • @@ -16898,7 +16876,7 @@

  • -
  • +
  • @@ -16909,7 +16887,7 @@

  • -
  • +
  • 1 @@ -16920,7 +16898,7 @@

  • -
  • +
  • 218 @@ -16931,7 +16909,7 @@

  • -
  • +
  • @@ -16942,7 +16920,7 @@

  • -
  • +
  • @@ -16953,7 +16931,7 @@

  • -
  • +
  • 1 @@ -16964,7 +16942,7 @@

  • -
  • +
  • 261 @@ -16975,7 +16953,7 @@

  • -
  • +
  • @@ -16986,7 +16964,7 @@

  • -
  • +
  • @@ -28195,7 +28173,7 @@

    app/models/question.rb

    - 88.0% + 85.19% lines covered @@ -28204,9 +28182,9 @@

    - 50 relevant lines. - 44 lines covered and - 6 lines missed. + 54 relevant lines. + 46 lines covered and + 8 lines missed.
    @@ -29037,18 +29015,18 @@

    - def answer_text + def tabling_member_parties

  • -
  • - 100 +
  • + - get_first_as_html_from('answerText_t') + get_all_from('tablingMemberParty_ses')
  • @@ -29081,18 +29059,18 @@

    - def corrected_answer + def answer_text

    -
  • - +
  • + 100 - get_first_as_html_from('correctionText_t') + get_first_as_html_from('answerText_t')
  • @@ -29125,18 +29103,18 @@

    - def question_text + def corrected_answer

    -
  • - 103 +
  • + - get_first_as_html_from('questionText_t') + get_first_as_html_from('correctionText_t')
  • @@ -29169,18 +29147,18 @@

    - def question_type + def question_text

    -
  • - +
  • + 103 - get_first_from('wpqType_t') + get_first_as_html_from('questionText_t')
  • @@ -29213,7 +29191,7 @@

    - def named_day? + def question_type

    @@ -29224,7 +29202,7 @@

    - question_type && question_type[:value]&.downcase == 'named day' + get_first_from('wpqType_t')

    @@ -29257,7 +29235,7 @@

    - def answering_department + def named_day?

    @@ -29268,7 +29246,7 @@

    - get_first_from('answeringDept_ses') + question_type && question_type[:value]&.downcase == 'named day'

    @@ -29301,7 +29279,7 @@

    - def answering_member_party + def answering_department

    @@ -29312,7 +29290,7 @@

    - get_first_from('answeringMemberParty_ses') + get_first_from('answeringDept_ses')

    @@ -29345,7 +29323,7 @@

    - def question? + def answering_member_party

    @@ -29356,7 +29334,7 @@

    - true + get_first_from('answeringMemberParty_ses')

    @@ -29378,6 +29356,94 @@

    + + +

    + +
    +
  • + 1 + + + + + def answering_member_parties +
  • +
    + +
    +
  • + + + + + + get_all_from('answeringMemberParty_ses') +
  • +
    + +
    +
  • + + + + + + end +
  • +
    + +
    +
  • + + + + + + +
  • +
    + +
    +
  • + 1 + + + + + def question? +
  • +
    + +
    +
  • + + + + + + true +
  • +
    + +
    +
  • + + + + + + end +
  • +
    + +
    +
  • + + + + + end
  • @@ -33029,8 +33095,8 @@

    -
  • - 1449 +
  • + 1461 @@ -38588,7 +38654,7 @@

    app/models/written_question.rb

    - 87.5% + 89.47% lines covered @@ -38597,9 +38663,9 @@

    - 40 relevant lines. - 35 lines covered and - 5 lines missed. + 38 relevant lines. + 34 lines covered and + 4 lines missed.
    @@ -39474,56 +39540,12 @@

    - def asking_or_tabling_member_party -

  • -
    - -
    -
  • - - - - - - fallback(get_first_from('tablingMemberParty_ses'), get_first_from('askingMemberParty_ses')) -
  • -
    - -
    -
  • - - - - - - end -
  • -
    - -
    -
  • - - - - - - -
  • -
    - -
    -
  • - 1 - - - - def attachment
  • -
  • +
  • @@ -39534,7 +39556,7 @@

  • -
  • +
  • @@ -39545,7 +39567,7 @@

  • -
  • +
  • @@ -39556,7 +39578,7 @@

  • -
  • +
  • 54 @@ -39567,7 +39589,7 @@

  • -
  • +
  • @@ -39578,7 +39600,7 @@

  • -
  • +
  • 1 @@ -39589,7 +39611,7 @@

  • -
  • +
  • @@ -39600,7 +39622,7 @@

  • -
  • +
  • diff --git a/spec/models/edm_spec.rb b/spec/models/edm_spec.rb index a2f3aebe..7ded7031 100644 --- a/spec/models/edm_spec.rb +++ b/spec/models/edm_spec.rb @@ -266,8 +266,8 @@ context 'where there is missing data' do let!(:edm) { Edm.new({}) } - it 'returns nil' do - expect(edm.amendments).to eq(nil) + it 'returns an empty array' do + expect(edm.amendments).to eq([]) end end @@ -276,30 +276,33 @@ 'amendmentText_t' => ['first item', 'second item'], 'amendment_numberOfSignatures_s' => [20, 10], 'amendment_primarySponsorPrinted_t' => ['sponsor one', 'sponsor two'], + 'amendment_primarySponsor_ses' => [54321, 76543], 'amendment_primarySponsorParty_ses' => [12345, 54321], 'identifier_t' => ['main id', 'amendment 1 id', 'amendment 2 id'], 'amendment_dateTabled_dt' => [DateTime.commercial(2022), DateTime.commercial(2021)], }) } - it 'returns nil' do + it 'returns an array containing a hash for each amendment' do expect(edm.amendments).to eq( [{ date_tabled: { value: DateTime.commercial(2022), field_name: 'amendment_dateTabled_dt' }, - index: 0, number_of_signatures: { value: 20, field_name: 'amendment_numberOfSignatures_s' }, - primary_sponsor: { value: 'sponsor one', field_name: 'amendment_primarySponsorPrinted_t' }, + primary_sponsor: { value: 54321, field_name: 'amendment_primarySponsor_ses' }, + primary_sponsor_text: { value: 'sponsor one', field_name: 'amendment_primarySponsorPrinted_t' }, primary_sponsor_party: { value: 12345, field_name: 'amendment_primarySponsorParty_ses' }, reference: { value: 'amendment 1 id', field_name: 'identifier_t' }, - text: { value: 'first item', field_name: 'amendmentText_t' } + text: { value: 'first item', field_name: 'amendmentText_t' }, + index: 0 }, { date_tabled: { value: DateTime.commercial(2021), field_name: 'amendment_dateTabled_dt' }, - index: 1, number_of_signatures: { value: 10, field_name: 'amendment_numberOfSignatures_s' }, - primary_sponsor: { value: 'sponsor two', field_name: 'amendment_primarySponsorPrinted_t' }, + primary_sponsor: { value: 76543, field_name: 'amendment_primarySponsor_ses' }, + primary_sponsor_text: { value: 'sponsor two', field_name: 'amendment_primarySponsorPrinted_t' }, primary_sponsor_party: { value: 54321, field_name: 'amendment_primarySponsorParty_ses' }, reference: { value: 'amendment 2 id', field_name: 'identifier_t' }, - text: { value: 'second item', field_name: 'amendmentText_t' } + text: { value: 'second item', field_name: 'amendmentText_t' }, + index: 1 } ] ) @@ -311,6 +314,7 @@ 'amendmentText_t' => ['first item'], 'amendment_numberOfSignatures_s' => [20], 'amendment_primarySponsorPrinted_t' => ['sponsor one'], + 'amendment_primarySponsor_ses' => [23456], 'amendment_primarySponsorParty_ses' => [12345], 'identifier_t' => ['main id', 'amendment 1 id'], 'amendment_dateTabled_dt' => [DateTime.commercial(2022)], @@ -320,12 +324,39 @@ expect(edm.amendments).to eq( [{ date_tabled: { value: DateTime.commercial(2022), field_name: 'amendment_dateTabled_dt' }, - index: 0, number_of_signatures: { value: 20, field_name: 'amendment_numberOfSignatures_s' }, - primary_sponsor: { value: 'sponsor one', field_name: 'amendment_primarySponsorPrinted_t' }, + primary_sponsor: { value: 23456, field_name: 'amendment_primarySponsor_ses' }, + primary_sponsor_text: { value: 'sponsor one', field_name: 'amendment_primarySponsorPrinted_t' }, primary_sponsor_party: { value: 12345, field_name: 'amendment_primarySponsorParty_ses' }, reference: { value: 'amendment 1 id', field_name: 'identifier_t' }, - text: { value: 'first item', field_name: 'amendmentText_t' } + text: { value: 'first item', field_name: 'amendmentText_t' }, + index: 0 + } + ] + ) + end + end + + context 'where some data is missing for an amendment' do + let!(:edm) { Edm.new({ + 'amendmentText_t' => ['first item'], + 'amendment_numberOfSignatures_s' => [20], + 'amendment_primarySponsorPrinted_t' => ['sponsor one'], + 'identifier_t' => ['main id', 'amendment 1 id'], + 'amendment_dateTabled_dt' => [DateTime.commercial(2022)], + }) } + + it 'returns all available data and some nil values where data is missing' do + expect(edm.amendments).to eq( + [{ + date_tabled: { value: DateTime.commercial(2022), field_name: 'amendment_dateTabled_dt' }, + number_of_signatures: { value: 20, field_name: 'amendment_numberOfSignatures_s' }, + primary_sponsor: { value: nil, field_name: nil }, + primary_sponsor_text: { value: 'sponsor one', field_name: 'amendment_primarySponsorPrinted_t' }, + primary_sponsor_party: { value: nil, field_name: nil }, + reference: { value: 'amendment 1 id', field_name: 'identifier_t' }, + text: { value: 'first item', field_name: 'amendmentText_t' }, + index: 0 } ] )