@rui.branco/jira-mcp 1.6.17 → 1.6.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +21 -11
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1831,7 +1831,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
1831
1831
  },
1832
1832
  defaultTeam: {
1833
1833
  type: "string",
1834
- description: "Default team name to auto-assign when creating tickets (e.g., 'Site Surveys (MODS)'). Resolved and validated via Jira Teams API. Pass empty string to clear.",
1834
+ description: "Default team name to auto-assign when creating tickets (e.g., 'Site Surveys (MODS)'). Resolved and validated via Jira Teams API. Pass 'none' to explicitly disable team prompts. Pass empty string to reset.",
1835
1835
  },
1836
1836
  },
1837
1837
  required: ["name"],
@@ -2895,6 +2895,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
2895
2895
  if (args.defaultTeam !== undefined) {
2896
2896
  if (args.defaultTeam === "") {
2897
2897
  defaultTeam = undefined;
2898
+ } else if (args.defaultTeam.toLowerCase() === "none") {
2899
+ defaultTeam = "none";
2898
2900
  } else {
2899
2901
  // Validate team exists via Jira Teams API
2900
2902
  const tempInst = { baseUrl, auth: authStr };
@@ -2968,7 +2970,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
2968
2970
  let text = `${action} instance "${instName}" (${baseUrl}).`;
2969
2971
  if (projects.length > 0) text += ` Projects: ${projects.join(", ")}.`;
2970
2972
  if (args.setDefault) text += " Set as default.";
2971
- if (defaultTeam) {
2973
+ if (defaultTeam === "none") {
2974
+ text += " Default team: None (disabled).";
2975
+ } else if (defaultTeam) {
2972
2976
  text += ` Default team: ${defaultTeam.name}.`;
2973
2977
  } else {
2974
2978
  // No default team — fetch available teams and prompt
@@ -2977,7 +2981,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
2977
2981
  const teams = await listTeams(tempInst);
2978
2982
  if (teams && teams.length > 0) {
2979
2983
  const list = teams.map((t, i) => `${i + 1}. ${t.title}`).join("\n");
2980
- text += `\n\n⚠ No default team configured. Available teams:\n${list}\n0. None\n\nAsk the user which team to set as default. If they pick one, call jira_add_instance with name="${instName}" and defaultTeam="<team name>".`;
2984
+ text += `\n\n⚠ No default team configured. Available teams:\n${list}\n0. None\n\nAsk the user to pick a number, type a team name to search, or choose None.\nIf they pick one, call jira_add_instance with name="${instName}" and defaultTeam="<team name>".\nIf the team is not listed, the user can type a name and you search with jira_add_instance defaultTeam="<name>" (it validates automatically).\nIf "None" is selected, call jira_add_instance with defaultTeam="none" to stop future prompts.`;
2981
2985
  }
2982
2986
  } catch {
2983
2987
  // Teams API not available, skip
@@ -3024,11 +3028,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
3024
3028
  }
3025
3029
  const currentDefault = rawConfig.defaultInstance || instances[0].name;
3026
3030
  let text = `# Configured Jira Instances (${instances.length})\n\n`;
3031
+ const missingTeam = [];
3027
3032
  for (const inst of instances) {
3028
3033
  const isDefault = inst.name === currentDefault ? " **(default)**" : "";
3029
3034
  const projs = inst.projects?.length > 0 ? `\n Projects: ${inst.projects.join(", ")}` : "";
3030
- const team = inst.defaultTeam ? `\n Default team: ${inst.defaultTeam.name}` : "";
3035
+ const team = inst.defaultTeam === "none" ? "\n Default team: None (disabled)" : inst.defaultTeam ? `\n Default team: ${inst.defaultTeam.name}` : "";
3031
3036
  text += `- **${inst.name}**${isDefault}: ${inst.baseUrl} (${inst.email})${projs}${team}\n`;
3037
+ if (!inst.defaultTeam) missingTeam.push(inst);
3038
+ }
3039
+ if (missingTeam.length > 0) {
3040
+ const names = missingTeam.map((i) => `"${i.name}"`).join(", ");
3041
+ text += `\n⚠ Instances without a default team: ${names}.\nAsk the user if they want to configure a default team. To set one, call jira_add_instance with name="<instance>" and defaultTeam="<team name>".`;
3032
3042
  }
3033
3043
  return { content: [{ type: "text", text }] };
3034
3044
 
@@ -3075,15 +3085,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
3075
3085
  let teamPrompt = "";
3076
3086
  if (args.team) {
3077
3087
  fields.customfield_10001 = await resolveTeamId(args.team, inst);
3078
- } else if (inst.defaultTeam) {
3088
+ } else if (inst.defaultTeam && inst.defaultTeam !== "none") {
3079
3089
  fields.customfield_10001 = inst.defaultTeam.id;
3080
- } else {
3090
+ } else if (!inst.defaultTeam) {
3081
3091
  // No team param and no default — fetch available teams and prompt user
3082
3092
  try {
3083
3093
  const teams = await listTeams(inst);
3084
3094
  if (teams && teams.length > 0) {
3085
3095
  const list = teams.map((t, i) => `${i + 1}. ${t.title}`).join("\n");
3086
- teamPrompt = `\n\n⚠ No team assigned and no default team configured for instance "${inst.name}". Available teams:\n${list}\n0. None\n\nTo assign a team to this ticket, call jira_update_ticket with issueKey and team parameter.\nIf a team is selected, ask the user if it should also be saved as the default team for instance "${inst.name}" (via jira_add_instance with defaultTeam).`;
3096
+ teamPrompt = `\n\n⚠ No team assigned and no default team configured for instance "${inst.name}". Available teams:\n${list}\n0. None\n\nAsk the user to pick a number, type a team name to search, or choose None.\nTo assign, call jira_update_ticket with issueKey and team parameter.\nIf a team is selected, ask the user if it should also be saved as the default team for instance "${inst.name}" (via jira_add_instance with defaultTeam).\nIf the team is not listed, the user can type a name and you search with jira_update_ticket team="<name>" (it validates automatically).\nIf "None" is selected, call jira_add_instance with defaultTeam="none" to stop future prompts.`;
3087
3097
  }
3088
3098
  } catch {
3089
3099
  // Teams API not available, proceed without team
@@ -3146,7 +3156,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
3146
3156
  );
3147
3157
  if (parentIssue.fields?.customfield_10001) {
3148
3158
  fields.customfield_10001 = parentIssue.fields.customfield_10001;
3149
- } else if (inst.defaultTeam) {
3159
+ } else if (inst.defaultTeam && inst.defaultTeam !== "none") {
3150
3160
  teamWarning = `\n\nNote: Parent ${args.parentKey} has no team assigned. Instance default team is "${inst.defaultTeam.name}". Use team parameter to assign it.`;
3151
3161
  }
3152
3162
  }
@@ -3497,14 +3507,14 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
3497
3507
  let teamPrompt = "";
3498
3508
  if (of.customfield_10001) {
3499
3509
  fields.customfield_10001 = of.customfield_10001;
3500
- } else if (inst.defaultTeam) {
3510
+ } else if (inst.defaultTeam && inst.defaultTeam !== "none") {
3501
3511
  fields.customfield_10001 = inst.defaultTeam.id;
3502
- } else {
3512
+ } else if (!inst.defaultTeam) {
3503
3513
  try {
3504
3514
  const teams = await listTeams(inst);
3505
3515
  if (teams && teams.length > 0) {
3506
3516
  const list = teams.map((t, i) => `${i + 1}. ${t.title}`).join("\n");
3507
- teamPrompt = `\n\n⚠ No team assigned (original had none) and no default team configured for instance "${inst.name}". Available teams:\n${list}\n0. None\n\nTo assign a team to this ticket, call jira_update_ticket with issueKey and team parameter.\nIf a team is selected, ask the user if it should also be saved as the default team for instance "${inst.name}" (via jira_add_instance with defaultTeam).`;
3517
+ teamPrompt = `\n\n⚠ No team assigned (original had none) and no default team configured for instance "${inst.name}". Available teams:\n${list}\n0. None\n\nAsk the user to pick a number, type a team name to search, or choose None.\nTo assign, call jira_update_ticket with issueKey and team parameter.\nIf a team is selected, ask the user if it should also be saved as the default team for instance "${inst.name}" (via jira_add_instance with defaultTeam).\nIf the team is not listed, the user can type a name and you search with jira_update_ticket team="<name>" (it validates automatically).\nIf "None" is selected, call jira_add_instance with defaultTeam="none" to stop future prompts.`;
3508
3518
  }
3509
3519
  } catch {
3510
3520
  // Teams API not available, proceed without team
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rui.branco/jira-mcp",
3
- "version": "1.6.17",
3
+ "version": "1.6.19",
4
4
  "description": "Jira MCP server for Claude Code - fetch tickets, search with JQL, update tickets, manage comments, change status, and get Figma designs",
5
5
  "main": "index.js",
6
6
  "bin": {