update_journal
Edit comments on Redmine issues by updating journal entries with new content. Modify existing issue notes to reflect changes or corrections.
Instructions
Edits a journal (comment) on an issue. Requires Redmine 5.0+.
Args:
journal_id: Comment ID (journals[].id from get_issue response)
notes: New comment contentInput Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| journal_id | Yes | ||
| notes | Yes |
Implementation Reference
- redmine_mcp_server.py:143-165 (handler)The core implementation of the update_journal logic using the requests library.
def update_journal(self, journal_id: int, notes: str) -> Dict[str, Any]: """Edit a journal (comment). Requires Redmine 5.0+.""" try: url = f"{self._url}/journals/{journal_id}.json" resp = requests.put( url, json={"journal": {"notes": notes}}, headers={"X-Redmine-API-Key": self._api_key}, timeout=30, ) if resp.status_code == 200: return resp.json().get("journal", {"id": journal_id, "notes": notes}) elif resp.status_code == 204: return {"id": journal_id, "notes": notes} else: raise RedmineError( f"update_journal failed: HTTP {resp.status_code} {resp.text}" ) except RedmineError: raise except Exception as e: raise RedmineError(f"update_journal failed: {e}") from e - redmine_mcp_interface.py:243-256 (registration)Tool registration and wrapper function for update_journal.
@mcp.tool() def update_journal(journal_id: int, notes: str) -> Dict[str, Any]: """Edits a journal (comment) on an issue. Requires Redmine 5.0+. Args: journal_id: Comment ID (journals[].id from get_issue response) notes: New comment content """ logger.info(f"tool=update_journal journal_id={journal_id}") try: return _client().update_journal(journal_id=journal_id, notes=notes) except RedmineError as e: logger.error(f"update_journal error: {e}") raise