S
S
Sergey Tryapkin2016-03-17 13:25:58
Ruby on Rails
Sergey Tryapkin, 2016-03-17 13:25:58

Change status if the task is assigned to a participant from the testing group?

Good afternoon!
There is a project, in which the task is transferred to users, each user has his own role - development, testing, etc.
Those. after the task is completed by the developer, he assigns the task to the tester, let's say V.V. Volodin.
How can I set up automatic status changes, depending on who is assigned as responsible?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Nesterovich, 2016-03-24
@vanderv

I would insert a callback into the model:

before_update :change_status
def change_status
self.status = :testing if self.user.type.tester?
end

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question