In the browser I can query "assignee was currentUser()" and get results just fine, and when my company was using jira server this JQL also worked just fine through the API, but now that we've moved to jira cloud I'm getting an error "A value provided by the function 'currentUser' is invalid for the field 'assignee'."
Looking at the documentation it does indeed say that "=, !=" are the only allowed values. I'm just confused as looking at the old docs it also said "WAS" is not allowed but it worked then, and now it doesn't work through API but does work in the browser.
Hello @Brandon Johnson
Welcome to the community.
The documentation link you provided is for the Server/Data Center hosted product, and also for Service Management.
To confirm, are you trying to execute your query against a Service project, or a Software project?
If you are getting the error in an API call can you please provide the full text of the API call and any variables that you are using in it?
Software project. correct software cloud docs are the same. Thank you for showing me my look at older versions was in the wrong place though.
There is no error in the UI
(assignee = currentUser() OR assignee was currentUser()) and project = SR and status not in ("Closed", "Warranty Period") and updated >= currentLogin() ORDER BY key ASC
just for fun I also did it without the first "assignee = currentUser() OR" bit too. This has the same results: UI works fine and API errors with the error
A value provided by the function 'currentUser' is invalid for the field 'assignee'.
This is the url as a GET request using pythons request library.
I have not done much work with using the JIRA REST API via python
I found this page which gives an example of an alternate implementation, still using python and the requests library. In this alternate the special characters with the JQL are not encoded. Instead the JQL is just a string enclosed in quotes.