diff --git a/app/assets/javascripts/app/controllers/_ui_element/ticket_perform_action.coffee b/app/assets/javascripts/app/controllers/_ui_element/ticket_perform_action.coffee index 429c17d21..2b57a1eea 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/ticket_perform_action.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/ticket_perform_action.coffee @@ -94,8 +94,7 @@ class App.UiElement.ticket_perform_action item.on('change', '.js-attributeSelector select', (e) => elementRow = $(e.target).closest('.js-filterElement') groupAndAttribute = elementRow.find('.js-attributeSelector option:selected').attr('value') - meta = params[attribute.name] && params[attribute.name][groupAndAttribute] || {} - @rebuildAttributeSelectors(item, elementRow, groupAndAttribute, elements, meta, attribute) + @rebuildAttributeSelectors(item, elementRow, groupAndAttribute, elements, {}, attribute) @updateAttributeSelectors(item) ) @@ -426,6 +425,7 @@ class App.UiElement.ticket_perform_action relation: 'Webhook' value: meta.webhook_id translate: false + nulloption: true ) else webhookSelection = App.view('generic/ticket_perform_action/webhook_not_available')( attribute: attribute ) diff --git a/public/assets/tests/form_ticket_perform_action.js b/public/assets/tests/form_ticket_perform_action.js index 166e8b388..8c7d43c53 100644 --- a/public/assets/tests/form_ticket_perform_action.js +++ b/public/assets/tests/form_ticket_perform_action.js @@ -692,74 +692,8 @@ test( "ticket_perform_action check when there's an available webhook", function( var testNoticeMessage = 'No available webhook, please create a new one or activate an existing one at "Manage > Webhook"' var noticeMessage = el.find('.controls.js-webhooks').text() - notEqual(noticeMessage, testNoticeMessage, 'form shows message when webhook is not available') + notEqual(noticeMessage, testNoticeMessage, 'form does not show notice message when webhook is available') - var noticeMessage = el.find('.controls.js-webhooks select option').first().text() - equal(noticeMessage, 'Webhook test (https://target.example.com/webhook)', 'form shows message when webhook is not available') -}); - -test( "ticket_perform_action check when there's no available webhook but an inactive is already selected", function() { - - $('#forms').append('