Reenabled notifications.
This commit is contained in:
parent
879ba366ab
commit
5de91cae96
3 changed files with 20 additions and 4 deletions
|
@ -27,13 +27,17 @@ class TicketArticlesController < ApplicationController
|
||||||
)
|
)
|
||||||
|
|
||||||
if @article.save
|
if @article.save
|
||||||
render :json => @article, :status => :created
|
|
||||||
|
|
||||||
# remove attachments from upload cache
|
# remove attachments from upload cache
|
||||||
Store.remove(
|
Store.remove(
|
||||||
:object => 'UploadCache::TicketZoom::' + current_user.id.to_s,
|
:object => 'UploadCache::TicketZoom::' + current_user.id.to_s,
|
||||||
:o_id => @article.ticket_id
|
:o_id => @article.ticket_id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# execute ticket events
|
||||||
|
Ticket::Observer::Notification.transaction
|
||||||
|
|
||||||
|
render :json => @article, :status => :created
|
||||||
else
|
else
|
||||||
render :json => @article.errors, :status => :unprocessable_entity
|
render :json => @article.errors, :status => :unprocessable_entity
|
||||||
end
|
end
|
||||||
|
@ -44,6 +48,10 @@ class TicketArticlesController < ApplicationController
|
||||||
@article = Ticket::Article.find(params[:id])
|
@article = Ticket::Article.find(params[:id])
|
||||||
|
|
||||||
if @article.update_attributes(params[:ticket_article])
|
if @article.update_attributes(params[:ticket_article])
|
||||||
|
|
||||||
|
# execute ticket events
|
||||||
|
Ticket::Observer::Notification.transaction
|
||||||
|
|
||||||
render :json => @article, :status => :ok
|
render :json => @article, :status => :ok
|
||||||
else
|
else
|
||||||
render :json => @article.errors, :status => :unprocessable_entity
|
render :json => @article.errors, :status => :unprocessable_entity
|
||||||
|
|
|
@ -55,7 +55,10 @@ class TicketsController < ApplicationController
|
||||||
:o_id => @article.ticket_id
|
:o_id => @article.ticket_id
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# execute ticket events
|
||||||
|
Ticket::Observer::Notification.transaction
|
||||||
|
|
||||||
render :json => @ticket, :status => :created
|
render :json => @ticket, :status => :created
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -64,6 +67,10 @@ class TicketsController < ApplicationController
|
||||||
@ticket = Ticket.find(params[:id])
|
@ticket = Ticket.find(params[:id])
|
||||||
|
|
||||||
if @ticket.update_attributes(params[:ticket])
|
if @ticket.update_attributes(params[:ticket])
|
||||||
|
|
||||||
|
# execute ticket events
|
||||||
|
Ticket::Observer::Notification.transaction
|
||||||
|
|
||||||
render :json => @ticket, :status => :ok
|
render :json => @ticket, :status => :ok
|
||||||
else
|
else
|
||||||
render :json => @ticket.errors, :status => :unprocessable_entity
|
render :json => @ticket.errors, :status => :unprocessable_entity
|
||||||
|
@ -75,6 +82,9 @@ class TicketsController < ApplicationController
|
||||||
@ticket = Ticket.find(params[:id])
|
@ticket = Ticket.find(params[:id])
|
||||||
@ticket.destroy
|
@ticket.destroy
|
||||||
|
|
||||||
|
# execute ticket events
|
||||||
|
Ticket::Observer::Notification.transaction
|
||||||
|
|
||||||
head :ok
|
head :ok
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -117,8 +117,6 @@ class Channel::EmailParser
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# execute ticket events
|
# execute ticket events
|
||||||
|
|
Loading…
Reference in a new issue