Skip to content

Commit

Permalink
Handle manual updates on same day correctly
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
KludgeKML committed Jun 17, 2024
1 parent 7a93e68 commit 9d002ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/views/content_items/manuals/_updates.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@
<% change_notes = updated_documents.last %>
<div class="govuk-!-margin-top-3">
<% change_notes.each do |change_note_entry| %>
<% change_note_items = change_note_entry.last.collect { |i| i["change_note"] } %>
<% change_note = change_note_entry.flatten.last %>
<% if change_note["title"].present? %>
<p class="govuk-body">
<%= link_to change_note["title"], change_note["base_path"], class: "govuk-link" %>
</p>
<% end %>
<%= simple_format(change_note["change_note"], class: "govuk-body") %>
<% change_note_items.each do |change_note_item| %>
<%= simple_format(change_note_item, class: "govuk-body") %>
<% end %>
<% end %>
</div>
<% end
Expand Down

0 comments on commit 9d002ca

Please sign in to comment.