Hi Everybody
I'm trying to do some manipulation of tickets in JIRA cloud using the python API - something I have done before but we have sinced switched to gsuite and google logins.
from jira import JIRA
I am logging in using an email/APIKey combo
Jira_username = args.username //set as email address in the args
Jira_password = args.password // set as token key in args
jira_options ={
'server': 'https://[Company].atlassian.net',
'verify': cafile,
}
append_log(log_file, "Connecting to JIRA", args.logging, verbose, message_level=1)
try:
jira = JIRA(jira_options, basic_auth=(Jira_username, Jira_password), )
except Exception as ex:
append_log(log_file, "JIRA connection Failed with Exception: %s" % ex.message, args.logging, verbose, message_level=1)
This all appears to works fine
When I try to do a search however, using JQL that works in the web browser:
JQL_Filter = "remainingEstimate is not EMPTY AND statusCategory != Done AND Team not in (15, 43, 16)"
append_log(log_file, "Searching for issues with filter: ' %s ' " % JQL_Filter, args.logging, verbose, message_level=2)
List_Of_Jiras = jira.search_issues(JQL_Filter)
At this point I get
jira.exceptions.JIRAError: JiraError HTTP 400 url: https://[COMPANY].atlassian.net/rest/api/2/search?jql=remainingEstimate+is+not+EMPTY+AND+statusCategory+!=+Done+AND+Team+not+in+(15,+43,+16)&validateQuery=True&startAt=0&maxResults=50
text: Field 'remainingEstimate' does not exist or this field cannot be viewed by anonymous users.
I get the same if I just restrict the JQL to "team = 14" or similar
Any ideas?
(ps, have put [Company] in manually for obvious reasons)