Atlassian connect Add on, how to create report

I am trying to create a report for a JIRA cloud add-on.

As described https://developer.atlassian.com/static/connect/docs/modules/jira/report.html, below is my report descriptor in atlassian-connect.json:

"modules": {
"reports": [
{
"key": "my-custom-report",
"name": "My Custom Report",
"description": "My Custom Report",
"url": "/my-custom-report-url",
"reportCategory": "other",
"thumbnailUrl": "/report.png"
}
]
}

Though I am running following error:

2015-02-26 11:15:30,280 UpmAsynchronousTaskManager:thread-4 ERROR admin 667x4448x1 1uc4rof 127.0.0.1 /rest/plugins/1.0/ [connect.plugin.installer.DefaultConnectAddOnInstaller] An exception occurred while installing the plugin '[com.foo.bar.cloud]. Uninstalling...
com.atlassian.plugin.connect.plugin.descriptor.InvalidDescriptorException: Invalid connect descriptor: com.github.fge.jsonschema.core.report.ListProcessingReport: failure
--- BEGIN MESSAGES ---
error: object instance has properties which are not allowed by the schema: ["reports"]
level: "error"
schema: {"loadingURI":"#","pointer":"/properties/modules"}
instance: {"pointer":"/modules"}
domain: "validation"
keyword: "additionalProperties"
unwanted: ["reports"]

 

Could someone please suggest what am I missing ? 

Many Thanks!

 

5 answers

1 accepted

Accepted Answer
1 vote

You want to use "jiraReports" instead of "reports".

Which is not obvious from the docs: https://developer.atlassian.com/static/connect/docs/modules/jira/report.html

However it is obvious from my Haskell implimentation: http://hackage.haskell.org/package/atlassian-connect-descriptor-0.4.0.0/docs/Data-Connect-Descriptor.html#t:JIRAModules

Appreciate it Robert! Looking at JIRA server way of Report impl, I was under impression it should only be "reports". Thanks for your findings.

0 votes

Can you tell us what the end results of using the Atlassian Connect Validator are? https://atlassian-connect-validator.herokuapp.com/validate

Thanks for taking a look Robert. This is what I get:

modules

DESCRIPTION
property "reports" not allowed by "properties" or by "patternProperties" and "additionalProperties" is false
I tried "report" too instead of "reports". Since Report is a JIRA module, I am assuming it has to go under modules.
Appreciate your help!
Thanks
Mukul

modules DESCRIPTION property "reports" not allowed by "properties" or by "patternProperties" and "additionalProperties" is false I tried "report" too instead of "reports". Since Report is a JIRA module, I am assuming it has to go under modules. Appreciate your help! Thanks Mukul

This works :

"jiraReports" : [{
	"key": "my-custom-report",
	"name": {
		"value": "Custom-Reports"
	},
	"description": {
		"value": "My Custom Reports"
	},
	"url": "/my-custom-report-url",
	"reportCategory": "other",
	"thumbnailUrl": "/report.png"
}]

Please note that "name" and "description" should be Objects not string.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

24,374 views 2 7
Join discussion

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