diff --git a/app/controllers/api/experimental/work_packages_controller.rb b/app/controllers/api/experimental/work_packages_controller.rb index a0a8c46959..5c00e50811 100644 --- a/app/controllers/api/experimental/work_packages_controller.rb +++ b/app/controllers/api/experimental/work_packages_controller.rb @@ -183,10 +183,9 @@ module Api json_query = query.as_json(except: :filters, include: :filters, methods: [:starred]) links = {} + links[:create] = api_experimental_queries_path if user.allowed_to?(:save_queries, @project, :global => @project.nil?) - if query.new_record? - links[:create] = api_experimental_queries_path if user.allowed_to?(:save_queries, @project, :global => @project.nil?) - else + if !query.new_record? links[:update] = api_experimental_query_path(query) if user.allowed_to?(:save_queries, @project, :global => @project.nil?) links[:delete] = api_experimental_query_path(query) if user.allowed_to?(:save_queries, @project, :global => @project.nil?) links[:publicize] = api_experimental_query_path(query) if user.allowed_to?(:manage_public_queries, @project, :global => @project.nil?) diff --git a/public/templates/work_packages.list.html b/public/templates/work_packages.list.html index 0a636a573f..e1ab54a254 100644 --- a/public/templates/work_packages.list.html +++ b/public/templates/work_packages.list.html @@ -60,10 +60,11 @@