jira_get_project_versions
Retrieve all versions for a Jira project to populate fixVersions and affectsVersions fields when creating or updating issues.
Instructions
Get all versions for a project - use this to find valid values for fixVersions and affectsVersions fields
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectKey | Yes | Project key to get versions for |
Implementation Reference
- src/index.ts:1148-1154 (handler)Main execution handler for the jira_get_project_versions tool. Parses input arguments using the schema and delegates to JiraClient.getProjectVersions, returning the result as JSON.case "jira_get_project_versions": { const { projectKey } = GetProjectVersionsSchema.parse(args); const versions = await jiraClient.getProjectVersions(projectKey); return { content: [{ type: "text", text: JSON.stringify(versions, null, 2) }], }; }
- src/index.ts:133-135 (schema)Zod input schema for validating the tool's projectKey parameter.const GetProjectVersionsSchema = z.object({ projectKey: z.string().describe("Project key to get versions for"), });
- src/index.ts:490-504 (registration)Tool descriptor returned by ListToolsRequestHandler, including name, description, and input schema.{ name: "jira_get_project_versions", description: "Get all versions for a project - use this to find valid values for fixVersions and affectsVersions fields", inputSchema: { type: "object", properties: { projectKey: { type: "string", description: "Project key to get versions for", }, }, required: ["projectKey"], }, },
- src/jira-client.ts:371-379 (helper)JiraClient helper method implementing the core logic: REST API call to fetch versions for the given projectKey.projectKey: string ): Promise< Array<{ id: string; name: string; released: boolean; archived: boolean }> > { return this.request< Array<{ id: string; name: string; released: boolean; archived: boolean }> >(`/project/${projectKey}/versions`); }