Skip to content

Commit 7a4098a

Browse files
jottakkaFrancisco Liberal
andauthored
[Jira ArcToolkit][ENG-1537] Adding documentation for new tools GetBoards and ListSprintsForBoards (#384)
* Adding documentation for new tool * update enum refs --------- Co-authored-by: Francisco Liberal <[email protected]>
1 parent cfbaf53 commit 7a4098a

File tree

6 files changed

+194
-1
lines changed

6 files changed

+194
-1
lines changed

pages/toolkits/productivity/jira.mdx

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import ToolFooter from "@/components/ToolFooter";
1111
author="Arcade"
1212
codeLink="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/jira"
1313
authType="OAuth2"
14-
versions={["1.0.0"]}
14+
versions={["2.2.0"]}
1515
/>
1616

1717
<Badges repo="arcadeai/arcade_jira" />
@@ -23,6 +23,7 @@ The Jira toolkit provides a comprehensive set of tools for interacting with Jira
2323
- Manage issue labels and attachments, including adding and removing them.
2424
- Transition issues between different statuses and manage comments on issues.
2525
- Browse and list available projects, priorities, and users within Jira.
26+
- Browse and list information of available boards and sprints within a Jira cloud.
2627

2728
This toolkit streamlines the process of issue management, making it easier to integrate Jira functionalities into applications and workflows.
2829

@@ -60,6 +61,7 @@ This toolkit streamlines the process of issue management, making it easier to in
6061
["Jira.AddLabelsToIssue", "Add labels to an existing Jira issue."],
6162
["Jira.RemoveLabelsFromIssue", "Remove labels from an existing Jira issue."],
6263
["Jira.UpdateIssue", "Update an existing Jira issue."],
64+
["Jira.ListSprintsForBoards", "Retrieve sprints from Jira boards with filtering options for planning and tracking purposes."],
6365
["Jira.ListLabels", "Get the existing labels (tags) in the user's Jira instance."],
6466
["Jira.ListUsers", "Browse users in Jira."],
6567
["Jira.GetUserById", "Get user information by their ID."],
@@ -76,6 +78,7 @@ This toolkit streamlines the process of issue management, making it easier to in
7678
["Jira.ListProjects", "Browse projects available in Jira."],
7779
["Jira.SearchProjects", "Get the details of all Jira projects."],
7880
["Jira.GetProjectById", "Get the details of a Jira project by its ID or key."],
81+
["Jira.GetBoards", "Get Jira boards, with the option to filter by a list of board names or IDs (accepts a mix of both). Supports 'offset' and 'limit' parameters."],
7982
["Jira.GetPriorityById", "Get the details of a priority by its ID."],
8083
["Jira.ListPrioritySchemes", "Browse the priority schemes available in Jira."],
8184
["Jira.ListPrioritiesAssociatedWithAPriorityScheme", "Browse the priorities associated with a priority scheme."],
@@ -401,6 +404,35 @@ Update an existing Jira issue.
401404
- **atlassian_cloud_id** (`string`, optional) The ID of the Atlassian Cloud to use (defaults to None). If not provided and the user has a single cloud authorized, the tool will use that. Otherwise, an error will be raised.
402405

403406

407+
## Jira.ListSprintsForBoards
408+
409+
<br />
410+
<TabbedCodeBlock
411+
tabs={[
412+
{
413+
label: "Call the Tool Directly",
414+
content: {
415+
Python: ["/examples/integrations/toolkits/jira/list_sprints_for_boards_example_call_tool.py"],
416+
JavaScript: ["/examples/integrations/toolkits/jira/list_sprints_for_boards_example_call_tool.js"],
417+
},
418+
},
419+
]}
420+
/>
421+
422+
Retrieve sprints from Jira boards with filtering options for planning and tracking purposes.
423+
424+
**Parameters**
425+
426+
- **board_identifiers_list** (`array[string]`, optional) List of board names or numeric IDs (as strings) to retrieve sprints from. Include all mentioned boards in a single list for best performance. Optional, defaults to None.
427+
- **max_sprints_per_board** (`integer`, optional) Maximum sprints per board (1-50). Latest sprints first. Optional, defaults to 50.
428+
- **offset** (`integer`, optional) Number of sprints to skip per board for pagination. Optional, defaults to 0.
429+
- **state** (`Enum` [SprintState](/toolkits/productivity/jira/reference#SprintState), optional) Filter by sprint state using SprintState enum value. Available options: SprintState.FUTURE (future sprints), SprintState.ACTIVE (active sprints), SprintState.CLOSED (closed sprints), SprintState.FUTURE_AND_ACTIVE (future + active), SprintState.FUTURE_AND_CLOSED (future + closed), SprintState.ACTIVE_AND_CLOSED (active + closed), SprintState.ALL (all states). Optional, defaults to None (all states).
430+
- **start_date** (`string`, optional) Start date filter in YYYY-MM-DD format. Can combine with end_date. Optional, defaults to None.
431+
- **end_date** (`string`, optional) End date filter in YYYY-MM-DD format. Can combine with start_date. Optional, defaults to None.
432+
- **specific_date** (`string`, optional) Specific date in YYYY-MM-DD to find sprints active on that date. Cannot combine with start_date/end_date. Optional, defaults to None.
433+
- **atlassian_cloud_id** (`string`, optional) Atlassian Cloud ID to use. Optional, defaults to None (uses single authorized cloud).
434+
435+
404436
## Jira.ListLabels
405437

406438
<br />
@@ -784,6 +816,31 @@ Get the details of a Jira project by its ID or key.
784816
- **atlassian_cloud_id** (`string`, optional) The ID of the Atlassian Cloud to use (defaults to None). If not provided and the user has a single cloud authorized, the tool will use that. Otherwise, an error will be raised.
785817

786818

819+
## Jira.GetBoards
820+
821+
<br />
822+
<TabbedCodeBlock
823+
tabs={[
824+
{
825+
label: "Call the Tool Directly",
826+
content: {
827+
Python: ["/examples/integrations/toolkits/jira/get_boards_example_call_tool.py"],
828+
JavaScript: ["/examples/integrations/toolkits/jira/get_boards_example_call_tool.js"],
829+
},
830+
},
831+
]}
832+
/>
833+
834+
Retrieve Jira boards either by specifying their names or IDs, or get all
835+
836+
**Parameters**
837+
838+
- **board_identifiers_list** (`array[string]`, optional) List of board names or numeric IDs (as strings) to retrieve using pagination. Include all mentioned boards in a single list for best performance. Default None retrieves all boards. Maximum 50 boards returned per call.
839+
- **limit** (`integer`, optional) Maximum number of boards to return (1-50). Defaults to max that is 50.
840+
- **offset** (`integer`, optional) Number of boards to skip for pagination. Must be 0 or greater. Defaults to 0.
841+
- **atlassian_cloud_id** (`string`, optional) Atlassian Cloud ID to use. Defaults to None (uses single authorized cloud).
842+
843+
787844
## Jira.GetPriorityById
788845

789846
<br />

pages/toolkits/productivity/jira/reference.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
Below is a reference of enumerations used by some tools in the Jira toolkit:
44

5+
## SprintState
6+
7+
Sprint states are used in the `Jira.ListSprints` tool to filter sprints. The following enumeration values represent the possible states supported by the Jira API, either individually or in combination:
8+
9+
- **FUTURE**: `future`
10+
- **ACTIVE**: `active`
11+
- **CLOSED**: `closed`
12+
- **FUTURE_AND_ACTIVE**: `future_and_active`
13+
- **FUTURE_AND_CLOSED**: `future_and_closed`
14+
- **ACTIVE_AND_CLOSED**: `active_and_closed`
15+
- **ALL**: `all`
16+
517
## PrioritySchemeOrderBy
618

719
- **NAME_ASCENDING**: `name ascending`
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "{arcade_user_id}";
6+
const TOOL_NAME = "Jira.GetBoards";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"board_identifiers_list": [
20+
"123",
21+
"Project Board"
22+
],
23+
"limit": 10,
24+
"offset": 0
25+
};
26+
27+
const response = await client.tools.execute({
28+
tool_name: TOOL_NAME,
29+
input: toolInput,
30+
user_id: USER_ID,
31+
});
32+
33+
console.log(JSON.stringify(response.output.value, null, 2));
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "{arcade_user_id}"
7+
TOOL_NAME = "Jira.GetBoards"
8+
9+
auth_response = client.tools.authorize(tool_name=TOOL_NAME)
10+
11+
if auth_response.status != "completed":
12+
print(f"Click this link to authorize: {auth_response.url}")
13+
14+
# Wait for the authorization to complete
15+
client.auth.wait_for_completion(auth_response)
16+
17+
tool_input = {
18+
'board_identifiers_list': ['123', 'Project Board'], 'limit': 10, 'offset': 0
19+
}
20+
21+
response = client.tools.execute(
22+
tool_name=TOOL_NAME,
23+
input=tool_input,
24+
user_id=USER_ID,
25+
)
26+
print(json.dumps(response.output.value, indent=2))
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "{arcade_user_id}";
6+
const TOOL_NAME = "Jira.ListSprintsForBoards";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"board_identifiers_list": [
20+
"123",
21+
"456"
22+
],
23+
"max_sprints_per_board": 10,
24+
"state": "active",
25+
"start_date": "2023-01-01",
26+
"end_date": "2023-12-31"
27+
};
28+
29+
const response = await client.tools.execute({
30+
tool_name: TOOL_NAME,
31+
input: toolInput,
32+
user_id: USER_ID,
33+
});
34+
35+
console.log(JSON.stringify(response.output.value, null, 2));
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "{arcade_user_id}"
7+
TOOL_NAME = "Jira.ListSprintsForBoards"
8+
9+
auth_response = client.tools.authorize(tool_name=TOOL_NAME)
10+
11+
if auth_response.status != "completed":
12+
print(f"Click this link to authorize: {auth_response.url}")
13+
14+
# Wait for the authorization to complete
15+
client.auth.wait_for_completion(auth_response)
16+
17+
tool_input = {
18+
'board_identifiers_list': ['123', '456'],
19+
'max_sprints_per_board': 10,
20+
'state': 'active',
21+
'start_date': '2023-01-01',
22+
'end_date': '2023-12-31'
23+
}
24+
25+
response = client.tools.execute(
26+
tool_name=TOOL_NAME,
27+
input=tool_input,
28+
user_id=USER_ID,
29+
)
30+
print(json.dumps(response.output.value, indent=2))

0 commit comments

Comments
 (0)