anteo / redmine_custom_workflows

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

rake task with custom workflow #315

Open ashrafalzyoud opened 1 year ago

ashrafalzyoud commented 1 year ago

hi all

how i can configure rake task to run custom workflow id =2 only? how i can configure rake task without execute any of custom workflow scripte?

picman commented 1 year ago

I think that you can manipulate with custom workflows assigned to the project. E.g. remove CW1 from the project, run some issues' updates and add CW1 back to the project. project.custom_workflows

ashrafalzyoud commented 1 year ago

@picman thx for your answer

But I need the CW1 execute And I need task execute everyday in midnight

It's nice future if besides active also periodic task

Because custom workflow execute only before and after save

picman commented 1 year ago

As I have already written, in your rake task:

  1. Remove workflows from the project or leave there just CW1 (project.custom_workflows)
  2. Do what you need
  3. Re-add removed workflows back to project (project.custom_workflows) I don't suppose that the whole task is run for more than a few milliseconds. So, if you run it at midnight, the manipulation with attached workflows to the project shouldn't be a problem, I think.