Closed Fasterwolf closed 1 year ago
Hi,
Use this code:
self.status_id = 8 if Group.find(9).users.include?(self.current_journal.user) unless new_record?
self.status_id = 7 if self.author == self.current_journal.user unless new_record? && self.current_journal.nil?
I hope it helps!
Hey I'm not much of a coder and been trying to figure out how to set a workflow to switch between two status.
When someone from group 9 leaves a note it changes to the status waiting for customer, status 8. When the author leaves a note changes to waiting for support, status 7.
Any help would be greatly appreciated.