Home Home
  login

Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




How do I specify Custom Field values to filter on in the IssuesFilterEN type?

custom-fields
api

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
Gary
Replies (6)
helpful
0
not helpful
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:

GenericEN g = new GenericEN();
g.GenericKey = customFieldId;
g.GenericValue = "7|8|"; // 7 is the id of say "Windows Vista" and 8 for "Widnows 7"

Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

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.


Gary
· 1
Gary
helpful
0
not helpful

Which version of Gemini are you running? For text fields simply enter the text to search.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

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


Gary
· 1
Gary
helpful
0
not helpful

That is fixed in 4.0. In 3.7 you need to use the get paged issue method instead.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

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


Gary
· 1
Gary