Skip to content

Commit 9d002ca

Browse files
committed
Handle manual updates on same day correctly
- Previously manual updates to the same path on the same day were grouped together and only the last was shown, despite all being present in the content item. The grouping code was correct, but in the view only the last item was displayed. https://govuk.zendesk.com/agent/tickets/5624376
1 parent 7a93e68 commit 9d002ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/views/content_items/manuals/_updates.html.erb

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,16 @@
2525
<% change_notes = updated_documents.last %>
2626
<div class="govuk-!-margin-top-3">
2727
<% change_notes.each do |change_note_entry| %>
28+
<% change_note_items = change_note_entry.last.collect { |i| i["change_note"] } %>
2829
<% change_note = change_note_entry.flatten.last %>
2930
<% if change_note["title"].present? %>
3031
<p class="govuk-body">
3132
<%= link_to change_note["title"], change_note["base_path"], class: "govuk-link" %>
3233
</p>
3334
<% end %>
34-
<%= simple_format(change_note["change_note"], class: "govuk-body") %>
35+
<% change_note_items.each do |change_note_item| %>
36+
<%= simple_format(change_note_item, class: "govuk-body") %>
37+
<% end %>
3538
<% end %>
3639
</div>
3740
<% end

0 commit comments

Comments
 (0)