我不确定这是 Bugzilla 问题还是 XML-RPC 问题:使用 XML-RPC API 的 Bug.create 方法在 Bugzilla 中创建错误时,如何输入多行描述?
description 参数采用字符串值,但空格(包括换行符)似乎被去除了,我最终得到了单行描述,而不是多行文本。
以下不起作用:
<?xml version="1.0"?>
<methodCall>
<methodName>Bug.create</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>product</name>
<value><string>Development</string></value>
</member>
<member>
<name>component</name>
<value><string>Component01</string></value>
</member>
<member>
<name>summary</name>
<value><string>Bug created via API</string></value>
</member>
<member>
<name>description</name>
<value>
<string>This bug was created through the Bugzilla XML/RPC interface
Here is the second line of the description
and the third line.</string>
</value>
</member>
<member>
<name>version</name>
<value><string>1</string></value>
</member>
<member>
<name>severity</name>
<value><string>enhancement</string></value>
</member>
<member>
<name>op_sys</name>
<value><string>All</string></value>
</member>
<member>
<name>platform</name>
<value><string>All</string></value>
</member>
<member>
<name>priority</name>
<value><string>P5</string></value>
</member>
<member>
<name>assigned_to</name>
<value><string>example@example.com</string></value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
我最终得到以下描述:
This bug was created through the Bugzilla XML/RPC interfaceHere is the second line of the descriptionand the third line.