Describe the bug
On Jira Server / Data Center (is_cloud=False), user mentions written into a comment or description body are not preserved. Passing a Server-style mention [~username] (or the email form [~huy.vu@example.com]) through add_comment / edit_comment strips the brackets, so Jira never recognizes it as a mention and the user is not notified.
Root cause (from source)
The write path _markdown_to_jira() → JiraPreprocessor.markdown_to_jira() (preprocessing/jira.py) has no mention handling at all. The only mention logic, _process_mentions() (preprocessing/jira.py:153), (a) runs only on the read path via clean_jira_text(), and (b) matches only the Cloud pattern \[~accountid:(.*?)\] (jira.py:137) — never the Server/DC [~username] syntax.
On the write path the [~username] token instead collides with the generic link/format regexes (e.g. jira.py:619) and loses its brackets.
Confirmed on main (newer than v0.23.1): the pattern is still accountid-only and still read-path-only.
To Reproduce
Against a Jira Server/DC instance, call jira_add_comment with a body containing [~someuser]. Observed: bracket stripped, no notification. Expected: mention preserved as valid Server wiki markup and the user notified.
Expected behavior
On Server/DC, preserve [~username] verbatim on the write path (Jira Server wiki markup already uses [~username] natively), so mentions survive and notify.
Environment
- mcp-atlassian: 0.23.0 (also verified against
main)
- Deployment: Jira Server/DC (not Cloud)
Describe the bug
On Jira Server / Data Center (
is_cloud=False), user mentions written into a comment or description body are not preserved. Passing a Server-style mention[~username](or the email form[~huy.vu@example.com]) throughadd_comment/edit_commentstrips the brackets, so Jira never recognizes it as a mention and the user is not notified.Root cause (from source)
The write path
_markdown_to_jira()→JiraPreprocessor.markdown_to_jira()(preprocessing/jira.py) has no mention handling at all. The only mention logic,_process_mentions()(preprocessing/jira.py:153), (a) runs only on the read path viaclean_jira_text(), and (b) matches only the Cloud pattern\[~accountid:(.*?)\](jira.py:137) — never the Server/DC[~username]syntax.On the write path the
[~username]token instead collides with the generic link/format regexes (e.g.jira.py:619) and loses its brackets.Confirmed on
main(newer than v0.23.1): the pattern is stillaccountid-only and still read-path-only.To Reproduce
Against a Jira Server/DC instance, call
jira_add_commentwith a body containing[~someuser]. Observed: bracket stripped, no notification. Expected: mention preserved as valid Server wiki markup and the user notified.Expected behavior
On Server/DC, preserve
[~username]verbatim on the write path (Jira Server wiki markup already uses[~username]natively), so mentions survive and notify.Environment
main)