data-target-options is not working in message card.

Here is my card json:

{ "message":"<b>test1<b>", 
"card":{
 "style": "link",
 "id": "sldhfgsidhg-sdfhdfh-dfghdfgh",
 "title": "Test for checking.",
 "description": {
 "format": "html",

 "value": "<b>Add-on link:</b> <a href='#' 
data-target='test-page' 
data-target-options='{\"options\":{\"title\":\"Custom Title\"}, 
\"parameters\":{\"article_id\":\"1234\"}, {\"urlTemplateValues\": 
{\"article_id\": \"12345\"}}}'>Open Dialog with parameters</a>"
 },
 "date": 1443057955792
},
"message_format" : "html"
}

 

 

I have capabilities as

"externalPage": [
{ "key": "test-page","url": "{baseURL}?article={article_id}", "name": { "value": "Test Click"}}
]

I want to pass article ID for external page link which should open in browser with JWT and  article_id as parameters. When I click on message card link, article_id is not replaced with value which i sent in data-target-options.


Can you guys please help me out.

1 answer

1 accepted

0 votes
Accepted answer

Hi Ramesh,

You should put your parameters in message.metadata as described here and then it should work.

Thanks a lot. That works.

How can I use data-target in "url" in card.

Example: "url": "<a href='#' data-target='test-page'></a> "

This is not working for me.

 

Regards

Ramesh

 

 

I would like to target the link URL to external page which should be similar to "data-target", so that I can get user context in my plugin.

I see. It is not possible right now. We have an issue for target url (internal) https://jira.atlassian.com/browse/HC-30017

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 14, 2018 in Hipchat Cloud

Hipchat Cloud and Stride End of Life: Just over 90 days away

Earlier this year we made the difficult decision to discontinue our team messaging tools, Stride and Hipchat. The end of life date for Stride and Hipchat Cloud is quickly approaching - February 15, 2...

471 views 0 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you