Added set to current user for macros.

This commit is contained in:
Martin Edenhofer 2016-03-13 23:58:46 +01:00
parent 4299f3ea4c
commit df1420d5db
2 changed files with 11 additions and 0 deletions

View file

@ -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

View file

@ -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,