Jira REST错误“字段'project'的值'XXX'不存在."]使用JQL执行搜索时 [英] Jira REST error "The value 'XXX' does not exist for the field 'project'."] while performing search with JQL

查看:85
本文介绍了Jira REST错误“字段'project'的值'XXX'不存在."]使用JQL执行搜索时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从.Net调用Jira REST API(项目中的查询问题),但出现上述HTTP 400错误.

I'm trying to call a Jira REST API from .Net (query issues in a project), but I get the above HTTP 400 error.

这是我拨打电话的方式:

This is how I make the call:

using System.Net;
var jiraRequest = HttpWebRequest.CreateHttp("https://example.com/rest/api/latest/search?jql=project=projectname");
jiraRequest.Credentials = new NetworkCredential(username, password);
var response = (HttpWebResponse)jiraRequest.GetResponse();

当我调试它时,注意到从Chrome请求相同的URL可以,但是从IE不能. 有什么想法吗?

As I was debugging it, a noticed that requesting the same URL from Chrome works, but from IE it doesn't. Any ideas?

推荐答案

如果执行JQL搜索的用户缺少对项目"XXX"的浏览项目权限,则会发生错误. 未经该许可,Jira会将项目视为不存在,因此它不是有效的过滤器值.

The error occurs if the user performing the JQL search lacks the browse project permission on the project 'XXX'. Without that permission Jira treats the project as non-existant, so it is not a valid filter value.

它在Chrome中对您有效,但在IE或使用您的代码中不起作用,可能是因为您以其他用户身份登录(例如,您的个人帐户,漫游器用户,匿名/未登录).

That it worked for you in Chrome, but not in IE or using your code, might be because you had been logged in as different users (e.g. your personal account, a bot user, anonymous/not logged in).

这篇关于Jira REST错误“字段'project'的值'XXX'不存在."]使用JQL执行搜索时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆