Closed Bug 960993 Opened 10 years ago Closed 10 years ago

Webservice Bug.search searching for Custom Multiple Selection fields don't work: <param> is not a valid parameter for the Bugzilla::Bug::match function.

Categories

(Bugzilla :: WebService, defect)

4.2.3
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 477601

People

(Reporter: hans-christian.hecht, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release)
Build ID: 20130511120803

Steps to reproduce:

Bug.search to search for a value of a Custom Multiple Selection field.


Hello,

I wan't to execute the follwing query using rpc:

cf_targetrevisions (Custom Multiple Selection) == "R4.1.3" AND
cf_affecteddocument (Custom Multiple Selection) == "SWS_DiagnosticLogAndTrace" AND
cf_issue_type (Custom Drop Down) == "Implementation Task"

<?xml version="1.0"encoding="UTF-8"?><methodCall>
<methodName>Bug.search</methodName>
<params><param><value><struct>
<member><name>cf_targetrevisions</name><value>R4.1.3</value></member>
<member><name>cf_affecteddocument</name><value>SWS_DiagnosticLogAndTrace</value></member>
<member><name>cf_issue_type</name><value>Implementation Task</value></member>
</struct></value></param></params></methodCall>

But for Custom Multiple Selection fields I get allways not a valid parameter exceptions using Bugzilla 4.2.3.

XmlRpcException: cf_affecteddocument is not a valid parameter for the Bugzilla::Bug::match function.


I saw that Bug 398281 reworks the Bug.search function, but I was'nt able to backport these changes to Bugzilla 4.2.3.

Is backporting the best soulation to fix this bug, or is there a better way?


Best regards

Christian Hecht


Actual results:

Error: <param> is not a valid parameter for the Bugzilla::Bug::match function.


Expected results:

Search will be processed.
This is because the Bug.search method in the stable branches only work on data that is directly in the bug table such as single select custom fields, etc. Multi-select custom fields, the values are stored in the separate mapping tables and therefore are not searchable. I doubt we will spend the time to backport the enhanced search that was committed to trunk in bug 477601 but feel free to see if that patch works for you. With that enhancement, the search should then work properly.

dkl
(In reply to Christian Hecht from comment #0)
> I saw that Bug 398281 reworks the Bug.search function, but I was'nt able to
> backport these changes to Bugzilla 4.2.3.

Bug 398281 has been fixed in Bugzilla 3.4, which is much older than 4.2.3, so you don't have to backport anything.

The API doc in 4.2 doesn't say you can pass custom fields to Bug.search, so it's not surprising this doesn't work for you. This problem has been fixed in 5.0.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.