Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'@' mentions for users does not work #407

Open
integrii opened this issue Jul 8, 2022 · 6 comments
Open

'@' mentions for users does not work #407

integrii opened this issue Jul 8, 2022 · 6 comments

Comments

@integrii
Copy link

integrii commented Jul 8, 2022

Describe the bug
When I use @user.name, it comes out as plain text in the JIRA UI. When I fetch an issue with an At mentioned member, I see the user prefixed with /~, However when I try to also put in /~user.name it comes out as plain text in the UI and \/~user.name in my jira-cli.

Please provide following details

  1. JiraCLI Version:
(Version="v1.0.0", GitCommit="", CommitDate="", GoVersion="go1.18.3", Compiler="gc", Platform="darwin/arm64")
  1. Are you using Jira cloud or on-premise jira server? Also mention the version for on-premise installation.
v8.13.20#813020
  1. What operating system are you using? Also mention version.
macOS Montery 12.4
  1. What terminal are you using? Also mention version.
MacOS Terminal w/ `zsh`

To Reproduce

Steps to reproduce the behavior:

  1. jira issue create
  2. try to @user.name` mention someone in the description or comments
  3. notice that the user is not @ mentioned and the @user.name is plain text

Expected behavior
@ mention binds to a user and notifies them as in the JIRA UI.

@ankitpokhrel
Copy link
Owner

Hi @integrii, on-premises installation use jira api v2 and it expects the data in this format [~displayname]. For example, the input below should render fine in Jira UI.

Please reach out to [~ankit] for clarification!

Screen Shot 2022-07-09 at 9 39 50 AM

Note that you'll need to use display name if its available. If you are unsure about the display name you can check it from jira issue assign command. The string inside the parenthesis ( is a display name.

Screen Shot 2022-07-09 at 9 38 36 AM

But yeah there seem to be some problem with escaping, I will check that. However tagging a user should work for valid input.

@ankitpokhrel ankitpokhrel added the waiting for response Waiting for users response label Aug 1, 2022
@edlandm
Copy link

edlandm commented Aug 19, 2022

Hello. I'm having the same issue. I'm not sure if it's because the username has spaces. I've tried two versions of this (with quotes and without) and still no luck. (This is a cloud Jira installation btw)
image
image

Here's my version info:
(Version="1.1.0", GitCommit="3b93e147eac468ad985bdece27469153b4bb2814", CommitDate="2022-08-14T08:10:40+00:00", GoVersion="go1.18.3", Compiler="gc", Platform="linux/amd64")

Let me know if you need anything else.
Thanks!

@ankitpokhrel ankitpokhrel added hacktoberfest and removed waiting for response Waiting for users response labels Sep 30, 2022
@funcode
Copy link

funcode commented Jun 17, 2023

I tried to put [~displayname] into a comment, but it is turned into \[](\~displayname\) when I view it via "jira issue view". On the web page, it is displayed as \[\~displayname\] when viewed as text.

$ jira version
(Version="1.4.0", GitCommit="eb842e18014303a575fde8e19508b3c7c13982c5", CommitDate="2023-05-09T07:09:45+00:00", GoVersion="go1.19.4", Compiler="gc", Platform="darwin/amd64")

SERVER INFO
-----------

Version:         8.20.15
Build Number:    820015
Deployment Type: Server
Default Locale:

@funcode
Copy link

funcode commented Jun 19, 2023

It seems markdown is not working in the comments. It can work with the following change:

index 79e160d..aecdf8c 100644
--- a/pkg/jira/issue.go
+++ b/pkg/jira/issue.go
@@ -274,7 +274,7 @@ type issueCommentRequest struct {

 // AddIssueComment adds comment to an issue using POST /issue/{key}/comment endpoint.
 func (c *Client) AddIssueComment(key, comment string) error {
-       body, err := json.Marshal(&issueCommentRequest{Body: md.ToJiraMD(comment)})
+       body, err := json.Marshal(&issueCommentRequest{Body: comment})
        if err != nil {
                return err
        }```

funcode added a commit to funcode/jira-cli that referenced this issue Jul 1, 2023
1. Fix ankitpokhrel#407
2. Fix ankitpokhrel#638
3. Display epic on the issue list
@jcstorino
Copy link

jcstorino commented Jul 18, 2023

I have the same problem !

1 - Jira issue assign does not show the user name, only the full display name
2 - Sending [~full display name] It appears literally like this in Jira

image

I'm missing something ?

@eraac
Copy link

eraac commented Jun 14, 2024

It's seems on long ongoing issue, I've the same problem here

$ jira version
(Version="1.5.1", GitCommit="0e0f82d52ef5a775d2cc662fbe38d9732b9b5c59", CommitDate="2024-01-20T10:48:06+00:00", GoVersion="go1.21.5", Compiler="gc", Platform="darwin/arm64")

Cloud version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants