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

Here is my card json:

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

 "value": "<b>Add-on link:</b> <a href='#' 
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 vote

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.






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)


Suggest an answer

Log in or Join to answer
Community showcase
Maarten Cautreels
Published Oct 07, 2017 in Hipchat

Bringing Structure to your HipChat Instance

...have mention name FirstnameLastname. Fe.: @MaartenCautreels This certainly helps to know who is being mentioned in a conversation. Imagine your colleague sends the following message...

469 views 1 4
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot