I am facing this issue as well. As suggested I have made sure the scheme context is set to Global mode.
It didn't solve my issue and keep getting the same error. By the way I am using JIRA rest API services with curl.
The exact error is, "Field 'issueFunction' does not exist or this field cannot be viewed by anonymous users."
The JIRA project is open to all and hence anybody can view all the issues inside this project. Also I am able to access all the issue fields anonymously without any issue. It is only when I use this script runner's 'issueFunction' throwing the authentication issue.
Any help is really appreciated.
issueFunction is not a field, it's a JQL function in script runner. Could you show us the JQL you are using it in? Is the Scriptrunnner fully enabled, and is the scripted-functions module enabled?
This same error message is encountered, even with everything set up correctly, if it is a new user who has never logged in before. Manually logging in with the same account in the web browser just once resolves the symptoms. Subsequent script runs will now succeed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Nic for your reply. This is the command I am using,
curl -D- -H 'content-type:application/json' -X POST -d '{"jql":"issueFunction in issueFieldMatch(\"project=FOO\",\"Version Found\",\"13.2_\")","fields":["summary","status","assignee"]}' http://XXX/rest/api/2/search
{"errorMessages":["Field 'issueFunction' does not exist or this field cannot be viewed by anonymous users."],"errors":{}}
I didn't get when you meant 'fully enabled'. I think the Script Runner plugin is enabled as I see the 'issueFunction' shown in my list of custom fields.
In the 'Script JQL Functions' page I see a list of functions that said are enabled and the function I have used in this example 'issueFieldMatch' is among them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What happens when you run identical JQL in the UI?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, then that suggests that you are logging in as a different user under REST and that user is not able to view the project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No for REST I am running anonymously and that is evident from my curl command above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
People often drop the username/password when posting here for security reasons, or you could have been using cookies. Anyway, that's the answer - you need to log in as a user who can see the project
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.