Field Script Runner: 'issueFunction' does not exist or this field cannot be viewed by anonymous users."

linusattupp June 10, 2015

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.

3 answers

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2015

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?

0 votes
David Garcia July 14, 2020

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.

0 votes
linusattupp June 10, 2015

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.

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2015

What happens when you run identical JQL in the UI?

linusattupp June 11, 2015

I get the results without any issue.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 11, 2015

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.

linusattupp June 11, 2015

No for REST I am running anonymously and that is evident from my curl command above.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 11, 2015

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events