Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Asset Panel with Asset Details

Hi Experts,

I am new in Jira integrations, so the know how is very low.

Well the ideia is to have in Jira Cloud an asset add-on and was possible to do it from this example https://developer.atlassian.com/cloud/assetsapi/introductions-and-basics/getting-started/.

Now I have a issue where I am not able to show the Details of the asset and no idea how to do it.

Please check what was done below .

Add Asset

{
"values": [
{
"origin": {
"appKey": "1",
"originId": "1"
},
"label": {
"value": "iPad 11 pro"
},
"fields": [
{
"fieldId": "RAM",
"value": "8GB DDR4 2400MHz"
},
{
"fieldId": "Display",
"value": "Retina"
}
]
},
{
"origin": {
"appKey": "2",
"originId": "2"
},
"label": {
"value": "iPad 12 pro"
},
"fields": [
{
"fieldId": "RAM",
"value": "8GB DDR4 2400MHz"
},
{
"fieldId": "Display",
"value": "Retina"
}
]
},
{
"origin": {
"appKey": "my-app",
"originId": "1"
},
"label": {
"value": "iPad 11 pro"
},
"fields": [
{
"fieldId": "RAM",
"value": "8GB DDR4 2400MHz"
},
{
"fieldId": "Display",
"value": "Retina"
}
]
},
{
"origin": {
"appKey": "my-app",
"originId": "2"
},
"label": {
"value": "iPad 12 pro"
},
"fields": [
{
"fieldId": "RAM",
"value": "8GB DDR4 2400MHz"
},
{
"fieldId": "Display",
"value": "Retina"
}
]
},
{
"origin": {
"appKey": "my-app",
"originId": "randomoriginid"
},
"label": {
"value": "iPad 11 pro"
},
"fields": [
{
"fieldId": "RAM",
"value": "8GB DDR4 2400MHz"
},
{
"fieldId": "Display",
"value": "Retina"
}
]
}
],
"start": 0,
"limit": 20,
"size": 5,
"isLastPage": true
}

Sample html Iframe

<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://unpkg.com/@atlaskit/css-reset@2.0.0/dist/bundle.css" media="all">
<script src="https://connect-cdn.atl-paas.net/all.js" async></script>
</head>
<body>
<section id="content" class="ac-content">
<h1>Welcome to my app!</h1>
<p id="appKey"></p>
<p id="originId"></p>
<p id="fieldId"></p>
</section>
<script type="text/javascript">
const urlParams = new URLSearchParams(window.location.search);
const appKey = urlParams.get('appKey');
const originId = urlParams.get('originId');
const fieldId = urlParams.get('fieldId');
document.getElementById("appKey").textContent = `The App Key Is: ${appKey}`;
document.getElementById("originId").textContent = `The Origin Id Is: ${originId}`;
document.getElementById("fieldId").textContent = `The Memory: ${fieldId}`;
</script>
</body>
</html>

The Connector atlassian-connect.json

{
"key": "my-app",
"name": "My App",
"description": "My asset Management app",
"baseUrl": "https://XXXXXXXXXXXXXX,
"authentication": {
"type": "none"
},
"modules": {
"assetPanels": [
{
"key": "my-app",
"url": "/sample_iframe.html?appKey={asset.appKey}&originId={asset.originId}&fieldId={asset.fieldId",
"name": {
"value": "Asset panel"
}
}
]
}
}

 

I am able to see the asset  only this in my app

"appKey": "1",
"originId": "1"
},
"label": {
"value": "iPad 11 pro"

But I want to see the details per the example  "fields": [
{
"fieldId": "RAM",
"value": "8GB DDR4 2400MHz"
},
{
"fieldId": "Display",
"value": "Retina"

No idea how this is possible at all.

Any idea?

Thank you

 

 

 

 

 

 

1 answer

0 votes

Hi @daniel.tavaresgomes ,

I think this a question for the Atlassian developer community:  https://community.developer.atlassian.com/c/Jira/jira-cloud

Regards,

Dugald

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Send an Email or Publish to Confluence - What should you do with your release notes?

Background When you hear the words ‘Release notes’, almost always you think of an unsolicited email from a software vendor. But I am here to tell you that from our data, sending release notes via E...

125 views 1 2
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you