1
jira에 "Abc Def Management"라는 프로젝트가 있습니다. 이 프로젝트에서 모든 문제를 얻으려고하면 나머지 API를 사용하여 다음과 같은 오류가 발생합니다.JQL 쿼리의 오류 : 문자 '% '이 (가) 예약 된 JQL 문자
errorMessages: [ 'Error in the JQL Query: The character \'%\' is a reserved JQL character. You must enclose it in a string or use the escape \'\\u0025\' instead.
아래 코드를 입력하고 있습니다.
client.post("https://xxx.atlassian.net/rest/auth/1/session", loginArgs, function(data, response){
console.log('Response', response);
if (response.statusCode == 200) {
console.log('succesfully logged in, session:', data.session);
var session = data.session;
// Get the session information and store it in a cookie in the header
var searchArgs = {
headers: {
// Set the cookie from the session information
cookie: session.name + '=' + session.value,
"Content-Type": "application/json"
},
data: {
// Provide additional data for the JIRA search. You can modify the JQL to search for whatever you want.
jql: "project=Abc%20Def%20Management"
}
};
// Make the request return the search results, passing the header information including the cookie.
client.post("https://xxx.atlassian.net/rest/api/2/search", searchArgs, function(searchResult, response) {
console.log('status code:', response.statusCode);
console.log('search result:', searchResult);
});
// response.render('index', {
// });
}
else {
console.log("Login failed");
// throw "Login failed :(";
}
});
어떻게이 오류를 해결할 수 있습니까?
시도해 보았지만 작동하지 않습니다. 프로젝트의 이름이 'abc'와 같은 단일 단어이면 아무런 결과도 생성되지 않습니다. –
jira 문제를 검색 할 때 jql에서 결과를 반환합니까? – GlennV
@Appunni, 프로젝트 이름을 따옴표로 묶어야합니다 :'jql = "Project = \"Abc Def Management \ "" – rorschach