Fixes #2698 - Custom ordering of Macros impossible (ordered by time added).

This commit is contained in:
Mantas Masalskis 2020-04-14 00:06:11 +03:00 committed by Thorsten Eckel
parent 5bcb650b54
commit db9f0eb772
3 changed files with 6 additions and 2 deletions

View file

@ -644,7 +644,7 @@ class App.TicketOverview extends App.Controller
renderOptionsMacros: =>
@possibleMacros = []
macros = App.Macro.search(filter: { active: true }, sortBy:'name', order:'DESC')
macros = App.Macro.getList()
items = @el.find('[name="bulk"]:checked')

View file

@ -41,7 +41,7 @@ class App.TicketZoomAttributeBar extends App.Controller
if @resetButton.get(0) && !@resetButton.hasClass('hide')
resetButtonShown = true
macros = App.Macro.search(filter: { active: true }, sortBy:'name', order:'DESC')
macros = App.Macro.getList()
@macroLastUpdated = App.Macro.lastUpdatedAt()
@possibleMacros = []

View file

@ -23,6 +23,10 @@ class App.Macro extends App.Model
'group_ids',
]
# get list of macros to show in UI
@getList: ->
App.Macro.search(filter: { active: true }, sortBy:'name', order:'ASC')
@description = '''
Macros make it easy to automate common, multi-step tasks within Zammad.