增加 Custom Workflows 插件配置.
Signed-off-by: lion.chan <cy187lion@sina.com>
This commit is contained in:
parent
220f046af4
commit
8cc69664cd
|
@ -111,3 +111,23 @@ RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=<plugin name>
|
|||
|
||||
- [Custom Workflows](https://www.redmine.org/plugins/custom-workflows)
|
||||
- [Redmine Issue Autoflow](https://redmineplugins.cn/projects/1/plugin_blocks/36?tab=general)
|
||||
|
||||
### Custom Workflows 插件
|
||||
|
||||
在 管理->Custom Workflows 中 Create a custom workflow。
|
||||
|
||||
输入名称,设置 Observable object,设置项目。
|
||||
|
||||
脚本参考示例如下:
|
||||
|
||||
```ruby
|
||||
if self.status_id==4
|
||||
self.assigned_to = User.find_by(login: 'lion')
|
||||
elsif self.status_id==6
|
||||
self.assigned_to = User.find_by(login: 'rick')
|
||||
elsif self.status_id==8
|
||||
self.assigned_to = self.author
|
||||
end
|
||||
```
|
||||
|
||||
脚本支持直接调用 Redmine App 模块接口,具体 API 参考:<https://github.com/redmine/redmine/tree/master/app/models> 中的文件。
|
||||
|
|
Loading…
Reference in New Issue