Example #1
0
 def set_task_status(self, task):
     # self.request.POST is a locked dict, we need a non locked one
     params = dict(self.request.POST)
     status = params['submit']
     task.set_status(status, self.request, self.request.user.id, **params)
     self.request.registry.notify(StatusChanged(
         self.request,
         task,
         status,
         ))
     return task
Example #2
0
 def set_task_status(self, task):
     # self.request.POST is a locked dict, we need a non locked one
     params = dict(self.request.POST)
     status = params['submit']
     task.set_status(status, self.request, self.request.user.id, **params)
     self.request.registry.notify(
         StatusChanged(
             self.request,
             task,
             status,
         ))
     return task
Example #3
0
 def delete(request):
     """
         delete a task
     """
     task = request.context
     user = request.user
     project = task.project
     log.info(u"# {user.login} deletes {s.__name__} {s.number}".format(
         user=user, s=task))
     try:
         task.set_status("delete", request, request.user.id)
     except Forbidden, err:
         log.exception(u"Forbidden operation")
         request.session.flash(err.message, queue="error")
Example #4
0
 def delete(request):
     """
         delete a task
     """
     task = request.context
     user = request.user
     project = task.project
     log.info(u"# {user.login} deletes {s.__name__} {s.number}".format(
                 user=user, s=task))
     try:
         task.set_status("delete", request, request.user.id)
     except Forbidden, err:
         log.exception(u"Forbidden operation")
         request.session.flash(err.message, queue="error")