Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,862
Community Members
 
Community Events
168
Community Groups

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

Apps for Confluence you won't want to miss: RSVP for September's Appy Hours

Calling all collaborators and Confluence users! Our Appy Hours event on September 29th features 4 presenters demoing functionality to superpower Confluence. Don't miss learning about these apps i...

112 views 0 9
Read article

Atlassian Community Events