如何使用greasemonkey脚本使用fogbugz中的Web服务下拉填充文本框?

时间:2022-02-11 07:42:36

I want to replace the 'client' field text box in fogbugz when you edit a case to be a drop down instead populated from a separate web service that will keep the client options up to date in our fogbugz. Is this possible? Will the choice they select in the drop down be able to save the same way it would if they had typed it into the text box?

当您将案例编辑为下拉列表而不是从单独的Web服务填充时,我想要替换fogbugz中的“客户端”字段文本框,该服务将使我们的fogbugz中的客户端选项保持最新。这可能吗?他们在下拉列表中选择的选项是否能够以与将其键入文本框时相同的方式保存?

2 个解决方案

#1


If you are on Windows, email us at http://contact.fogcreek.com and get on the FogBugz 7 beta which has the ability to do this with plugins (instead of GM) or even, just with a custom field.

如果您使用的是Windows,请发送电子邮件至http://contact.fogcreek.com,并获取FogBugz 7测试版,该测试版可以通过插件(而不是GM)进行,甚至可以使用自定义字段。

#2


An off-the-cuff answer:

一个袖手旁观的答案:

Yes. For a first pass, you can implement it by creating the drop-down list on the side, populating it with a GM_xmlHttpRequest, and adding a "onchange" action listener to the drop-down list, which will populate the textfield with the relevant information from the drop-down. This ensures that fogbugz sees exactly what it wants, in exactly the way it wants to see it.

是。对于第一遍,您可以通过在侧面创建下拉列表,使用GM_xmlHttpRequest填充它,并在下拉列表中添加“onchange”动作侦听器来实现它,该下拉列表将使用相关信息填充文本字段从下拉列表。这确保了fogbugz完全按照它想要的方式看到它想要的东西。

#1


If you are on Windows, email us at http://contact.fogcreek.com and get on the FogBugz 7 beta which has the ability to do this with plugins (instead of GM) or even, just with a custom field.

如果您使用的是Windows,请发送电子邮件至http://contact.fogcreek.com,并获取FogBugz 7测试版,该测试版可以通过插件(而不是GM)进行,甚至可以使用自定义字段。

#2


An off-the-cuff answer:

一个袖手旁观的答案:

Yes. For a first pass, you can implement it by creating the drop-down list on the side, populating it with a GM_xmlHttpRequest, and adding a "onchange" action listener to the drop-down list, which will populate the textfield with the relevant information from the drop-down. This ensures that fogbugz sees exactly what it wants, in exactly the way it wants to see it.

是。对于第一遍,您可以通过在侧面创建下拉列表,使用GM_xmlHttpRequest填充它,并在下拉列表中添加“onchange”动作侦听器来实现它,该下拉列表将使用相关信息填充文本字段从下拉列表。这确保了fogbugz完全按照它想要的方式看到它想要的东西。