-
-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jira integration does not work #3141
Comments
I was thinking about this problem and it looks like you could implement this for Jira in perhaps simple way without requiring API token for Jira (which is not convenient since Jira only provides personal tokens) by generating proper link for the particular Jira project (based on project ID provided by Kiwi TCMS admin when creating Jira tracker or by matching as you do now) and having user of Kiwi TCMS just click on a button that will have such link. That would require you to have proper project ID and correct issue ID (for bugs). Issue ID's may not be the same for all Jira users since Jira allows considerable customizations. By letting people specify project ID and issue ID to use, your bug trackers configuration for Jira would be trivial and you would just need to provided a proper link behind a button that user needs to click on. The link behind the button would depend on the selected Jira bug tracker for that particular Jira project. Just a thought. |
Can you provide a screenshot of the successful health-check? The error message below says "Authentication failed" which seems to be the root cause of the problem.
|
It seems that I have made some progress. I had to use the base URL without For reference I had to use my e-mail for the username. I also had to use my personal API token for Jira. Edited: To create bug in a proper project in Jira I had to use the Jira project |
Description of problem
I added JIRA Change Bug Tracker as described in the documentation and I verified with the Configuration health check that configuration is OK and that I can use a Bug URL from our JIRA project to verify Kiwi TCMS can access it.
However, when I tried to create a bug from within a test case inside a test execution by clicking on "Report bug" from drop down menu at the right top side of the expanded view of the test case that is being executed, I've got a pop up with this:
Internal error: JiraError HTTP 404 url: https://deepsig.atlassian.net/jira/rest/api/2/serverInfo
followed by additional text indicating: X-Seraph-Loginreason': 'AUTHENTICATED_FAILED' within the response headers.
I looked at the Atlassian description here: https://confluence.atlassian.com/display/JIRA050/Creating+Issues+via+direct+HTML+links
which you referenced in your source code (./tcms/issuetracker/types.py) and I was able to manually create a link that works.
For example I could use the following type of link (as specified by Atlassian on their page referenced above) to create a new bug:
https://XXXXXXX.atlassian.net/secure/CreateIssueDetails!init.jspa?pid=PPP&issuetype=TTTT
Here XXXX is our Atlassian instance (we used Cloud version of Jira), PPP is the Jira project ID and TTTT is the Jira issue type ID for bugs. The link worked because I was logged in to my Atlassian account in the same browser.
I don't know why your implementaton did not work. Perhaps Jira implementation changed since you implemented this. Also, it would be very beneficial if you would provide ability for Kiwi TCMS admins to specify/edit Project ID whenever adding/changing new Jira bug tracker and Issue type ID (in our case it was 10004 for bugs). That way we would have more flexibility handling various Jira projects that may not be handling a single product, but multiple products, with potentially separate test plans (all using same Jira project for example). If I understood your documentation you are trying to match Kiwi product name and Jira project name. In some cases a Jira project may handle more than one product.
Version or commit hash (if applicable)
Kiwi TCMS: V12.1
Jira: latest Cloud version
Steps to Reproduce
Actual results
HTTP 404 error
Expected results
New browser tab from Jira that allows user to complete creation of a bug issue in Jira. (it may report that some mandatory fields are not specified and user can complete them) Once mandatory fields are provided (for example, summary and reporter) Jira will create a bug issue.
If Kiwi TCMS provides "reporter" field using First name and Last name of a user Jira may be able to find that same user and may not report reporter field as missing.
Additional info (Python traceback, logs, etc.)
Relevant information provided above. I did not provide full traceback because it may contain private information from Atlassian.
The text was updated successfully, but these errors were encountered: