anteo/redmine_custom_workflows

How to change status if Done ratio is changed to 100

SinghNanak opened this issue · 4 comments

How to change status if Done ratio is changed to 100

Issue::before_save

if self.done_ratio == 100
  self.status_id = 5
end

i had tried that earlier but then i cannot change issue status

That is strange. I've tested it and it worked. Verify that the issue status ID and done_ration exist in your system. And also check the log for any errors. You can also add some debug messages to find out what went wrong, e.g.:

Rails.logger.info ">>> #{self.status.name}"

i had tried that earlier but then i cannot change issue status

Hi,

Usually this issue is occur when you have field, which is mandatory according to your workflow, but it is empty. In this case, the status won’t be changed. Check your workflow first!

I hope it helps!