guilhemmarchand / TA-jira-service-desk-simple-addon

Atlasian JIRA add-on for Splunk alert actions
11 stars 9 forks source link

Mentions capability #89

Open satya-pavan opened 3 years ago

satya-pavan commented 3 years ago

Hi Guilhem,

Thanks for a wonderful app. I am wondering if there is a way to mention or tag a person in the description of the JIRA issue or in the comments section or in any other field.

When I add '@' in the summary, its considering '@' as a string, not converting the following _username to a mention (UI eg: @user --> tagged_user_name )

guilhemmarchand commented 3 years ago

Hi @satya-pavan

Thank you very much, appreciated.

It seems it could be supported via a specific structure in the JSON payload while the TA does the rest call to create the issue:

As of now it's not supported in the TA, you certainly can give it a try via adding a comment using the jirarest custom command:

https://ta-jira-service-desk-simple-addon.readthedocs.io/en/latest/userguide.html#additional-examples-for-jira-api-wrapper

With the example from the nodes mentions doc.

I will give it a check, this could be added as an option potentially in the alert action definition.

guilhemmarchand commented 3 years ago

@satya-pavan

Are you using JIRA Cloud?

I have been looking around the question, as far as I understand a mention can be made by adding a comment to an existing issue (not in the description)

However, it seems to be a thing with the v3 API only, which only Cloud product has, version 2 is on JIRA server currently. Therefore, I couldn't test this as I don't have currently a subscription.

It looks like a simple REST call adding something like:

{    
"body": "[~accountid:5d9d467e0d44fc0dca5413e7] <your comment>"
}

Would achieve it, note that you have to use account IDs in any case.

Any thoughts?

satya-pavan commented 3 years ago

@satya-pavan

Are you using JIRA Cloud?

I have been looking around the question, as far as I understand a mention can be made by adding a comment to an existing issue (not in the description)

However, it seems to be a thing with the v3 API only, which only Cloud product has, version 2 is on JIRA server currently. Therefore, I couldn't test this as I don't have currently a subscription.

It looks like a simple REST call adding something like:

{    
"body": "[~accountid:5d9d467e0d44fc0dca5413e7] <your comment>"
}

Would achieve it, note that you have to use account IDs in any case.

Any thoughts?

Thanks for trying this out Guilhem. At this point, we have 2 challenges, our JIRA is not on cloud and even if it is, getting 'account ids' and loading them to splunk to use it in mentions is not preferable for us.

guilhemmarchand commented 3 years ago

Hi @satya-pavan What is your latest thinking/outcome about this one?

cmtrispl commented 2 years ago

Hi Guilhem,

Wanted to jump in on this. This feature would be helpful for myself and my team, would this be a possibility in future releases?

Thanks in advance!

guilhemmarchand commented 2 years ago

Hi @cmtrispl

Understood, I will come back on it once my own backlog has reduced a bit ;-)

sanjay900 commented 1 year ago

Out of curiousity, does something like this work? I was able to verify it works on jira cloud, but I don't have a jira on prem instance set up. I just have it put this variable into the description, and thats enough for it to mention me in the ticket. It appears that at least for jira cloud, the [~accountid:id] syntax just works anywhere, and i wonder if that is also the case for on prem

| eval mention= 
      [| jirarest account=cybercx_soc target="rest/api/2/user/search?query=username" 
      | spath 
      | eval search="\"[".'{}.displayName'."|~accountid:".'{}.accountId'."]\"" 
      | return $search]