@pschroee/redmine-mcp 0.5.5 → 0.5.6

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.
@@ -211,8 +211,10 @@ export function formatJournals(journals, lookup = {}, options = {}) {
211
211
  return "";
212
212
  }
213
213
  const header = `## History (${journals.length} entries)\n\n`;
214
+ // Sort journals chronologically (oldest first) to ensure correct numbering
215
+ const sortedJournals = [...journals].sort((a, b) => new Date(a.created_on).getTime() - new Date(b.created_on).getTime());
214
216
  // 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));
217
+ const formattedEntries = sortedJournals.map((j, i) => formatJournalEntry(j, i + 1, lookup, options));
216
218
  const entries = formattedEntries.reverse().join("\n---\n\n");
217
219
  return header + entries;
218
220
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pschroee/redmine-mcp",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "MCP server for Redmine - full API access with configurable tool groups",
5
5
  "type": "module",
6
6
  "bin": {