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

I need to know what DB entry need to make in DB which will enable a certain custom workflow on a certain project. #298

Closed gaurav-cointab closed 1 year ago

gaurav-cointab commented 1 year ago

I have a auto project creation code, it creates new projects on certain conditions. Can you please guide me towards which table I need to make an entry at the time of project creation, so as to apply a certain workflow on it. So that the new project has that particular workflow on by default?

gaurav-cointab commented 1 year ago

The prblem is that I dont it for all the projects. I need it for a certain types of project.

picman commented 1 year ago

Add entry into **custom_workflows_projects*** table

MariaDB [redmine]> desc custom_workflows_projects;
+--------------------+---------+------+-----+---------+-------+
| Field              | Type    | Null | Key | Default | Extra |
+--------------------+---------+------+-----+---------+-------+
| project_id         | int(11) | YES  | MUL | NULL    |       |
| custom_workflow_id | int(11) | YES  | MUL | NULL    |       |
+--------------------+---------+------+-----+---------+-------+

In a script something like that:

 my_project.custom_workflow_ids << my_custom_workflow.id