diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.coffee index 2c66a6c49..e43864afa 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.coffee @@ -548,6 +548,13 @@ class App.TicketZoom extends App.Controller else @sidebar.tagWidget.add(tag) + # apply user changes + else if attributes[1] is 'owner_id' + if content.pre_condition is 'current_user.id' + ticket[attributes[1]] = App.Session.get('id') + else + ticket[attributes[1]] = content.value + # apply direct value changes else ticket[attributes[1]] = content.value diff --git a/db/seeds.rb b/db/seeds.rb index 418860f9c..17abd8e95 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1661,6 +1661,10 @@ Macro.create_if_not_exists( operator: 'add', value: 'spam', }, + 'ticket.owner_id' => { + pre_condition: 'current_user.id', + value: '', + }, }, note: 'example macro', active: true,