anteo / redmine_custom_workflows

Allows to create custom workflows for Redmine
http://www.redmine.org/plugins/custom-workflows
GNU General Public License v2.0
182 stars 72 forks source link

Actions possible on new tickets #325

Closed pkoevesdi closed 5 months ago

pkoevesdi commented 1 year ago

Sadly any new created tickets in our Redmine 5 installation become an asignee (if none is chosen then the current user). But we have the process, that status "new" (id = 1) means "unassigned", so no owner. Only then the next status is "assigned" and has an owner. So I made the rule

if @issue.status_id == 1
           self.assigned_to_id = ''
end

which works if a tickets gets changed, but not on a newly created one. Is it possible to trigger workflow scripts by creating a new ticket? If not, I'd like to set it as a feature request.

Thank You!

picman commented 1 year ago

Do you have it as a "Before save" script? As a "Before save" script it works for me. I've a default assignee set in the project's settings and the assignee is reset to nil when an issue of the given tracker is created. I'd also recommend changing '' with nil:

if @issue.status_id == 1
 self.assigned_to_id = nil 
end
pkoevesdi commented 1 year ago

Hmm, strange, but now it works, I "didn't change"® something. Sorry fo the disturbance, I really tested it thourougly before opening up this here, but somehow now it works as expected.