targetprocess-mcp-server 1.0.10 → 1.0.12

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.
package/build/index.js CHANGED
@@ -50,12 +50,28 @@ server.registerTool('get_user_story_content', {
50
50
  }],
51
51
  };
52
52
  }
53
- const dom = new JSDOM(`<html><body><div id="content">${description}</div></body></html>`);
54
- const descriptionText = dom.window.document.getElementById('content')?.textContent;
53
+ let userStoryResults = {
54
+ name: userStory.Name,
55
+ id: userStory.Id,
56
+ description: '',
57
+ feature: userStory.Feature?.Name,
58
+ featureId: userStory.Feature?.Id,
59
+ };
60
+ try {
61
+ const dom = new JSDOM(`<html><body><div id="content">${description}</div></body></html>`);
62
+ const descriptionText = dom.window.document.getElementById('content')?.textContent;
63
+ if (descriptionText) {
64
+ userStoryResults.description = descriptionText;
65
+ }
66
+ }
67
+ catch (error) {
68
+ console.error("Error parsing user story description:", error);
69
+ console.error("Returning user story without description");
70
+ }
55
71
  return {
56
72
  content: [{
57
73
  type: 'text',
58
- text: JSON.stringify(descriptionText)
74
+ text: JSON.stringify(userStoryResults)
59
75
  }],
60
76
  };
61
77
  });
package/build/tp.js CHANGED
@@ -98,7 +98,7 @@ export class TpClient {
98
98
  const bug = {
99
99
  "Name": title,
100
100
  "Project": {
101
- "Id": 59901
101
+ "Id": config.tp.projectId
102
102
  },
103
103
  "customFields": [{
104
104
  "name": "Origin",
@@ -107,7 +107,7 @@ export class TpClient {
107
107
  }],
108
108
  "assignedTeams": [{
109
109
  "team": {
110
- "id": 127065
110
+ "id": config.tp.teamId
111
111
  }
112
112
  }],
113
113
  "Description": bugContent,
@@ -126,7 +126,7 @@ export class TpClient {
126
126
  const bug = {
127
127
  "Name": title,
128
128
  "Project": {
129
- "Id": 59901
129
+ "Id": config.tp.projectId
130
130
  },
131
131
  "UserStory": {
132
132
  "Id": userStoryId
@@ -138,7 +138,7 @@ export class TpClient {
138
138
  }],
139
139
  "assignedTeams": [{
140
140
  "team": {
141
- "id": 127065
141
+ "id": config.tp.teamId
142
142
  }
143
143
  }],
144
144
  "Description": bugContent,
@@ -152,7 +152,7 @@ export class TpClient {
152
152
  const testPlan = {
153
153
  "Name": title,
154
154
  "Project": {
155
- "Id": 59901
155
+ "Id": config.tp.projectId
156
156
  },
157
157
  "LinkedGeneral": {
158
158
  "ResourceType": "General",
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "engines": {
26
26
  "node": ">=20.x"
27
27
  },
28
- "version": "1.0.10",
28
+ "version": "1.0.12",
29
29
  "description": "MCP server for Tartget Process",
30
30
  "main": "build/index.js",
31
31
  "keywords": [