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 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.

 

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Mar 26, 2018 in Hipchat Data Center

Migration of Hipchat server to Data Center - a retrospective

Background While our Hipchat server environment was reliable and performing well, as a significant and growing part of our business, the need to leverage the benefits of Hipchat Data Center&nbs...

527 views 2 7
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