Skip to content

Commit

Permalink
Fixes zammad#4413 - Overview ticket preview should also load on saved…
Browse files Browse the repository at this point in the history
… objects.
  • Loading branch information
dvuckovic authored and rolfschmidt committed Dec 5, 2022
1 parent 71c00f2 commit 3685ff7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ class App.UiElement.ApplicationSelector
@disableRemoveForOneAttribute(item)
@saveParams(item)

if attribute.preview isnt false
@preview(item)

item

@renderParamValue: (item, attribute, params, paramValue) ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ class App.UiElement.ticket_selector extends App.UiElement.ApplicationSelector

@applySortable(item, attribute, params)

if attribute.preview isnt false
@preview(item)

item

@saveParams: (item, params, attribute) ->
Expand Down
15 changes: 0 additions & 15 deletions spec/system/manage/overviews_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@
within '.table-overview .js-tableBody' do
find("tr[data-id='#{overview.id}'] td.table-draggable").click
end

within '.ticket_selector' do
# trigger the preview
fill_in 'condition::ticket.customer_id::value_completion', with: customer_one.firstname
end
end

context 'when single customer exists' do
Expand Down Expand Up @@ -267,11 +262,6 @@
within '.table-overview .js-tableBody' do
find("tr[data-id='#{overview.id}'] td.table-draggable").click
end

within '.ticket_selector' do
# trigger the preview
fill_in 'condition::ticket.owner_id::value_completion', with: owner_one.firstname
end
end

context 'when single owner exists' do
Expand Down Expand Up @@ -348,11 +338,6 @@
within '.table-overview .js-tableBody' do
find("tr[data-id='#{overview.id}'] td.table-draggable").click
end

within '.ticket_selector' do
# trigger the preview
fill_in 'condition::ticket.organization_id::value_completion', with: organization_one.name
end
end

context 'when single organization exists' do
Expand Down

0 comments on commit 3685ff7

Please sign in to comment.