自定义字段中获取值

自定义字段中获取值

本文介绍了从 Redmine 自定义字段中获取值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 redmine 中创建了自定义字段,我们手动输入客户端电话号码.还在 redmine 自定义工作流程中编写了一个 ruby​​ 代码,以便在提出票证 ID 时向客户端发送短信.想在创建新问题之前获取我们输入的电话号码..那么我如何从自定义字段中获取电话号码的值并将其链接到代码?请推荐我

I have created custom field in redmine wher we type the client phone number manually.Also written a ruby code in redmine custom workflow to send sms to client when ticket id is raised.In the code I can type phone number but i actually want to fetch that phone number which we type before creating the new issue..So how do i fetch the value of phone number from the custom field and link it to the code?Please suggest me

推荐答案

IssueCustomField.where("field = 8 AND value like '+31%'")

将字段编号替换为自定义字段的字段编号,如果您想过滤某种类型的电话号码,请使用上述类似格式

Replace the field number with the field number of your custom field and if you want to filter on some type of phone number, use the above like format

这篇关于从 Redmine 自定义字段中获取值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 18:35