Closed jacob-ai-bot[bot] closed 3 weeks ago
Hello human! 👋
This PR was created by JACoB to address the issue Convert New Jira Issues into JACoB Todos
Please review the PR carefully. Auto-generated code can and will contain subtle bugs and mistakes.
If you identify code that needs to be changed, please reject the PR with a specific reason. Be as detailed as possible in your comments. JACoB will take these comments, make changes to the code and push up changes. Please note that this process will take a few minutes.
Once the code looks good, approve the PR and merge the code.
Summary:
We want to enhance our integration with Jira by converting new Jira issues into JACoB todos. The goal is to allow users to sync specific Jira boards with our application so that any new issues created in those boards are automatically converted into todos within JACoB.
Requirements:
OAuth Enhancements:
cloudId
.users
table.cloudId
in theprojects
table, associated with the relevant project.Settings Page Updates:
isActive
status totrue
.Database Updates:
issueSources
table with the following fields:id
, timestamps (created_at
,updated_at
).provider
: Enum limited to "GitHub" or "Jira".projectId
: Foreign key referencing theprojects
table.boardId
,boardUrl
,boardName
: Details of the Jira board.isActive
: Boolean indicating if the board is currently synced.API Endpoint:
Periodic Issue Retrieval:
Token Refresh Handling:
Expected Outcome:
Additional Considerations:
Here is more detailed information gathered from the internet to help with this request.
To integrate your application with Jira and allow users to select a specific board for issue analysis, follow these detailed steps:
1. Determine the User's Jira Domain
Each Jira Cloud instance is hosted under a unique subdomain in the format
https://{user-domain}.atlassian.net
. To identify the correct domain for API requests:During OAuth Authorization: Capture the
cloudid
parameter from the redirect URL after the user authorizes your app. Thiscloudid
corresponds to the user's Jira instance.Retrieve Base URL Using
cloudid
: Use thecloudid
to fetch the base URL of the user's Jira instance.Request:
```http GET https://api.atlassian.com/ex/jira/{cloudid}/rest/api/3/serverInfo Authorization: Bearer {access_token} Accept: application/json
2. Retrieve Available Boards
With the
baseUrl
determined, fetch the list of boards accessible to the user:Request:
```http GET {baseUrl}/rest/agile/1.0/board Authorization: Bearer {access_token} Accept: application/json