Thank you very much for following up on this. Your assumptions are correct, I obfuscated any values. After I adjusted the authentication mode I’m able to launch the setup without any further issues.
However, as soon as I enable synchronization for a task I receive the following error:
2019-08-26 16:46:54,286 DEBUG [connectionpool] https://mysite.atlassian.net:443 "GET /rest/api/2/user/assignable/search?username=firstname.lastname%40mysite.com&project=DUMMY01&maxResults=2000 HTTP/1.1" 404 None
2019-08-26 16:46:54,288 ERROR [bridge] JiraError HTTP 404 url: https://mysite.atlassian.net/rest/api/2/user/assignable/search?username=firstname.lastname%40mysite.com&project=DUMMY01&maxResults=2000
text: No project with the provided key exists
response headers = {'X-AREQUESTID': 'abcdefgh-ijkl-mnop-qrst-uvwxyzabcdef', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'Content-Encoding': 'gzip', 'Transfer-Encoding': 'chunked', 'X-AACCOUNTID': 'abcdefghijklmnopqrstuvwx', 'Strict-Transport-Security': 'max-age=315360000; includeSubDomains; preload', 'Vary': 'Accept-Encoding', 'ATL-TraceId': 'abcdefghijklmnop', 'Server': 'AtlassianProxy/1.15.8.1', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache, no-store, no-transform', 'Date': 'Mon, 26 Aug 2019 23:46:54 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Timing-Allow-Origin': '*'}
response text = {"errorMessages":["No project with the provided key exists"],"errors":{}}
Traceback (most recent call last):
File "/usr/local/sg-jira-bridge/sg_jira/bridge.py", line 309, in sync_in_jira
safe_event
File "/usr/local/sg-jira-bridge/sg_jira/handlers/enable_syncing_handler.py", line 98, in process_shotgun_event
event,
File "/usr/local/sg-jira-bridge/sg_jira/handlers/task_issue_handler.py", line 216, in process_shotgun_event
"originalEstimate": "%d m" % (sg_entity["est_in_mins"] or 0)
File "/usr/local/sg-jira-bridge/sg_jira/handlers/entity_issue_handler.py", line 125, in _create_jira_issue_for_entity
jira_project=jira_project,
File "/usr/local/sg-jira-bridge/sg_jira/jira_session.py", line 290, in find_jira_user
maxResults=JIRA_RESULT_PAGING,
File "/home/root/.local/lib/python2.7/site-packages/jira/client.py", line 2214, in search_assignable_users_for_issues
return self._fetch_pages(User, None, 'user/assignable/search', startAt, maxResults, params)
File "/home/root/.local/lib/python2.7/site-packages/jira/client.py", line 575, in _fetch_pages
resource = self._get_json(request_path, params=page_params, base=base)
File "/home/root/.local/lib/python2.7/site-packages/jira/client.py", line 2549, in _get_json
r = self._session.get(url, params=params)
File "/home/root/.local/lib/python2.7/site-packages/jira/resilientsession.py", line 151, in get
return self.__verb('GET', url, **kwargs)
File "/home/root/.local/lib/python2.7/site-packages/jira/resilientsession.py", line 147, in __verb
raise_on_error(response, verb=verb, **kwargs)
File "/home/root/.local/lib/python2.7/site-packages/jira/resilientsession.py", line 57, in raise_on_error
r.status_code, error, r.url, request=request, response=r, **kwargs)
JIRAError: JiraError HTTP 404 url: https://mysite.atlassian.net/rest/api/2/user/assignable/search?username=firstname.lastname%40mysite.com&project=DUMMY01&maxResults=2000
text: No project with the provided key exists
response headers = {'X-AREQUESTID': 'abcdefgh-ijkl-mnop-qrst-uvwxyzabcdef', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'Content-Encoding': 'gzip', 'Transfer-Encoding': 'chunked', 'X-AACCOUNTID': 'abcdefghijklmnopqrstuvwx', 'Strict-Transport-Security': 'max-age=315360000; includeSubDomains; preload', 'Vary': 'Accept-Encoding', 'ATL-TraceId': 'abcdefghijklmnop', 'Server': 'AtlassianProxy/1.15.8.1', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache, no-store, no-transform', 'Date': 'Mon, 26 Aug 2019 23:46:54 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Timing-Allow-Origin': '*'}
response text = {"errorMessages":["No project with the provided key exists"],"errors":{}}
2019-08-26 16:46:54,299 ERROR [webapp] 127.0.0.1 - code 500, message
The project definitely exists. I also tried it with a different key, but the result is the same.
In order to debug the call I’m using Postman, but I run into the same issues.
Further research lead me to the following page of the documentation for the Jira REST API: https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-project-get It states that an Oauth scope of read:jira-work
is required, so I’m wondering if I have to use ‘OAuth’ instead of ‘Basic Auth’. I’m currently the process to get this set up so I can use it.
Any additional information from your side is greatly appreciated.