How do I specify Custom Field values to filter on in the IssuesFilterEN type?
I have several custom fields set up on a project, some of which are multi-select list boxes, and I want to pass certain selections (including multiple selections from one field) to the GetFilteredIssues() method using the .NET API. I've looked at the online documentation and can see there is a CustomFields collection, of GenericEN types, and a SavedCustomFieldValues string, but am not sure how to utilise these.
Can you provide some examples of how to do this?
Thanks
Gary
· 1 |
|
Thursday, August 11, 2011, 11:52:58 AM |
0
|
ANSWER
All you have to do is populate the CustomFields collection. Each GenericEN will have the Key set to the custom field id and the value to a pipe delimited values of the lookup (ids). eg:
|
||||
|
0
|
Thanks for the swift response. I've tried this and it works, however it has the undesirable side effect of removing all the CustomFieldDataEN items in the IssueEN.IssueCustomFieldData collection of the issues returned, except for the one that corresponds to the custom field I'm filtering on. There are other custom fields I need to report on, so I want to still have these returned. I've tried passing additional GenericEN objects representing the custom fields I want returned, but I get no items returned from GetFilteredIssues() when I do this. I tried passing all the lookup values where appropriate in the format you've suggested. I wasn't sure what to pass for a free text field though (i.e. custom field with no look up data). Appreciate any help with this. |
||||
|
0
|
Which version of Gemini are you running? For text fields simply enter the text to search. |
||||
|
0
|
Gemini 3.7.32 I want to filter on 1 custom field, but still have all of them returned in the IssueEN.IssueCustomFieldData collection. Is this possible? Thanks |
||||
|
0
|
That is fixed in 4.0. In 3.7 you need to use the get paged issue method instead. |
||||
|
0
|
Yes, that works. Had an issue getting items back from GetPagedFilteredIssues() but once I'd discovered from another post that it requires the user ID to be set, it's returning what I want. Thanks |
||||
|