Skip to content

Commit

Permalink
Show changed keys of info request event in details.
Browse files Browse the repository at this point in the history
Fixes #7189.
  • Loading branch information
dracos committed Sep 9, 2023
1 parent 8d4511c commit d29dfe8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/views/request/details.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
:site_name => site_name, :contact_path => help_contact_path) %>
</p>

<% columns = ['id', 'event_type', 'created_at', 'described_state', 'calculated_state', 'last_described_at' ] %>
<% columns = ['id', 'event_type', 'details', 'created_at', 'described_state', 'calculated_state', 'last_described_at' ] %>

<table>
<thead>
Expand All @@ -41,7 +41,11 @@
<tr class="<%= cycle('odd', 'even') %>">
<% for column in columns %>
<td data-label="<%= column %>"><%
d = info_request_event.send(column)
if column == 'details'
d = info_request_event.params_diff[:new].keys().join(', ')
else
d = info_request_event.send(column)
end
if column == 'event_type' and d == 'edit'
d = 'edit metadata'
end
Expand Down
1 change: 1 addition & 0 deletions spec/views/request/details.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
assign :info_request, mock_request
render
expect(rendered).to have_content('edit metadata')
expect(rendered).to have_content('allow_new_responses_from')
end
end

0 comments on commit d29dfe8

Please sign in to comment.