Jira Python:无法在Jira.search\u问题中传递用户输入?
我无法将用户输入传递到JQL查询?我没有别的选择,但没有效果 这是代码Jira Python:无法在Jira.search\u问题中传递用户输入?,python,jira,user-input,python-jira,Python,Jira,User Input,Python Jira,我无法将用户输入传递到JQL查询?我没有别的选择,但没有效果 这是代码 project_name=raw_input("Please give the project name: ") reporter_name=raw_input("Please provide the name of creator: ") date_from=raw_input("Please provide the time interval for which you want issues: From ") d
project_name=raw_input("Please give the project name: ")
reporter_name=raw_input("Please provide the name of creator: ")
date_from=raw_input("Please provide the time interval for which you want issues: From ")
date_to=raw_input("Please provide the time interval for which you want issues: To ")"""
total_issues = jira.search_issues('project = %s AND reporter = %s AND created > %s and created < %s' % (projectname, reportername, datefrom, dateto))
print total_issues
我们真的可以将变量传递给JQL查询吗?JQL允许吗?在
date\u to=
行中至少有一个“
-引用太多。。。这只是一个复制错误吗?同样,在本例中,您有变量date\u to
等,但查询行有dateto
。异常显示这不是实际的问题,但是修复您的示例会让我们看起来不那么乏味。异常显示为jira中的i.search_issues('project=project_name AND reporter=reporter_name AND created>date_from AND createdtraceback (most recent call last):
File "jiradetailsizmirtomtom.py", line 27, in <module>
for i in jira.search_issues('project = project_name AND reporter = reporter_name AND created > date_from and created < date_to'):
File "/Library/Python/2.7/site-packages/jira/client.py", line 1747, in search_issues
issues = self._fetch_pages(Issue, 'issues', 'search', startAt, maxResults, search_params)
File "/Library/Python/2.7/site-packages/jira/client.py", line 397, in _fetch_pages
resource = self._get_json(request_path, params=page_params, base=base)
File "/Library/Python/2.7/site-packages/jira/client.py", line 2172, in _get_json
r = self._session.get(url, params=params)
File "/Library/Python/2.7/site-packages/jira/resilientsession.py", line 150, in get
return self.__verb('GET', url, **kwargs)
File "/Library/Python/2.7/site-packages/jira/resilientsession.py", line 146, in __verb
raise_on_error(response, verb=verb, **kwargs)
File "/Library/Python/2.7/site-packages/jira/resilientsession.py", line 56, in raise_on_error
r.status_code, error, r.url, request=request, response=r, **kwargs)
jira.exceptions.JIRAError