jira-cli icon indicating copy to clipboard operation
jira-cli copied to clipboard

Jira shows backslashes when adding a comment with specific characters

Open tlbueno opened this issue 10 months ago • 2 comments

Describe the bug when adding a comment which contains dash, paranteses or underscore, it is displayed with a backslash before it in jira

Please provide following details

  1. JiraCLI Version:
(Version="1.6.0", GitCommit="Homebrew", CommitDate="2025-04-19T09:33:11+00:00", GoVersion="go1.24.2", Compiler="gc", Platform="linux/amd64")
  1. Are you using Jira cloud or on-premise jira server?
SERVER INFO
-----------

Version:         9.12.22
Build Number:    9120022
Deployment Type: Server
Default Locale:  
  1. What operating system are you using? Also mention version.
Linux Fedora 42
  1. What terminal are you using? Also mention version.
terminator - terminator-2.1.4-4.fc42.1.noarch

To Reproduce

Steps to reproduce the behavior:

  1. Add a comment as below into a file name test.tmpl
This is a problematic comment:
{code:bash}
echo "my test - - - _ _ _ ( ( ( ) ) )"
{code}
  1. Execute the command:
jira issue comment add MY-ISSUE-123 --template ./test.tmpl --no-input

Expected behavior I expect to do not have backslashes in the comment

Screenshots

Additional context

tlbueno avatar May 02 '25 21:05 tlbueno

The same story. If I use something like

> jira issue worklog add PROJECT-84 "3h 44m" --comment "ISSUE-12345: Some details for task" --no-input

I see descriptions like ISSUE\-12345: Some details for task and it breaks reporting scripts because the issue number is corrupted

QuAzI avatar Jul 24 '25 14:07 QuAzI

It's not only the comment, but also the main description especially with code blocks.

jaeyeom avatar Oct 24 '25 23:10 jaeyeom