I am using the Atlassian.Jira NuGet package in my web app.
I can successfully query Jira using built in fields for example Project, ResolutionDate etc. but I cannot use a custom field.
I have a custom field named "Organizations" and I want to add this to my query where it is equal to a certain string.
Here is my query:
var issues = from i in jira.Issues.Queryable
where i.Created >= dateFrom &&
i.Created <= dateTo && i.Type != "Change" && i["Organizations"] == organization
select i;
I have tried the following:
i["Organizations"] == organization
Returns 400. Operator ~ not supported.
i["Organizations"].ToString == organization
Returns Index was out of range. Must be non-negative and less than the size of the collection.
Sounds like there is nothing to return but I can see issues in the portal.
I also tried:
i.CustomFields["Organizations"].Values[0] == organization
- Response Content: {"errorMessages":["Error in the JQL Query: Expecting a field name but got ')'. You must surround ')' in quotation marks to use it as a field name
Though I don't think it is supposed to be used this way.
Any help is appreciated!