@pschroee/redmine-mcp 0.5.1 → 0.5.4

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.
@@ -12,5 +12,7 @@ export interface JournalFormatOptions {
12
12
  }
13
13
  /**
14
14
  * Format an array of journal entries as Markdown
15
+ * Entries are displayed in reverse chronological order (newest first)
16
+ * Note numbers match Redmine's numbering (1 = oldest, highest = newest)
15
17
  */
16
18
  export declare function formatJournals(journals: RedmineJournal[], lookup?: NameLookup, options?: JournalFormatOptions): string;
@@ -178,14 +178,13 @@ function formatDetail(detail, lookup, options = {}) {
178
178
  /**
179
179
  * Format a single journal entry as Markdown
180
180
  */
181
- function formatJournalEntry(journal, index, lookup, options = {}) {
181
+ function formatJournalEntry(journal, noteNumber, lookup, options = {}) {
182
182
  const lines = [];
183
183
  // Header with note number, date and user
184
- const noteNum = index + 1;
185
184
  const date = formatDate(journal.created_on);
186
185
  const user = journal.user.name;
187
186
  const privateTag = journal.private_notes ? " 🔒" : "";
188
- lines.push(`### #${noteNum} - ${date} - ${user}${privateTag}`);
187
+ lines.push(`### #${noteNumber} - ${date} - ${user}${privateTag}`);
189
188
  lines.push("");
190
189
  // Notes (if any)
191
190
  if (journal.notes && journal.notes.trim()) {
@@ -204,12 +203,16 @@ function formatJournalEntry(journal, index, lookup, options = {}) {
204
203
  }
205
204
  /**
206
205
  * Format an array of journal entries as Markdown
206
+ * Entries are displayed in reverse chronological order (newest first)
207
+ * Note numbers match Redmine's numbering (1 = oldest, highest = newest)
207
208
  */
208
209
  export function formatJournals(journals, lookup = {}, options = {}) {
209
210
  if (!journals || journals.length === 0) {
210
211
  return "";
211
212
  }
212
213
  const header = `## History (${journals.length} entries)\n\n`;
213
- const entries = journals.map((j, i) => formatJournalEntry(j, i, lookup, options)).join("\n---\n\n");
214
+ // Format entries with correct note numbers (1 = oldest), then reverse for display (newest first)
215
+ const formattedEntries = journals.map((j, i) => formatJournalEntry(j, i + 1, lookup, options));
216
+ const entries = formattedEntries.reverse().join("\n---\n\n");
214
217
  return header + entries;
215
218
  }
package/dist/server.js CHANGED
@@ -3,7 +3,7 @@ import { registerTools } from "./tools/index.js";
3
3
  export function createServer(redmineClient, toolGroups) {
4
4
  const server = new McpServer({
5
5
  name: "redmine-mcp",
6
- version: "0.5.1",
6
+ version: "0.5.4",
7
7
  });
8
8
  registerTools(server, redmineClient, toolGroups);
9
9
  return server;
@@ -38,7 +38,7 @@ export function registerCoreTools(server, client) {
38
38
  inputSchema: {
39
39
  issue_id: z.number().describe("The issue ID"),
40
40
  include: z.string().optional().describe("Include: attachments, relations, journals, watchers, children, changesets, allowed_statuses"),
41
- include_description_diffs: z.boolean().optional().default(false).describe("Include full description diffs in history (can be verbose)"),
41
+ include_description_diffs: z.boolean().optional().default(true).describe("Include full description diffs in history (can be verbose)"),
42
42
  },
43
43
  }, async (params) => {
44
44
  // Fetch issue and enumerations in parallel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pschroee/redmine-mcp",
3
- "version": "0.5.1",
3
+ "version": "0.5.4",
4
4
  "description": "MCP server for Redmine - full API access with configurable tool groups",
5
5
  "type": "module",
6
6
  "bin": {