How to add webItem for jira and dynamicContentMacro for confluence to an onDemand plugin

My Atlassian-connect.json look like this

  1. "modules": {
  2. "dynamicContentMacros": [
  3. {
  4. "name": {
  5. "value": "Macro whose content is rendered by an iframe"
  6. },
  7. "description": {
  8. "value": "Render a macro in a page with an iframe"
  9. },
  10. "key": "dynamic-sport-macro",
  11. "url": "/display?body={macro.hash}&space_id={space.id}&page_id={page.id}",
  12. "categories": ["development"],
  13. "documentation": {
  14. "url": "https://developer.atlassian.com/static/connect/docs"
  15. },
  16. "outputType": "inline",
  17. "bodyType": "rich-text",
  18. "height": "80px",
  19. "width": "200px",
  20. "icon": {
  21. "url": "/images/icons/icon.png",
  22. "height": 16,
  23. "width": 16
  24. },
  25. "alias": "dynamic-macro",
  26. "editor": {
  27. "url": "/editor",
  28. "editTitle": {
  29. "value": "Edit your favourite sport"
  30. },
  31. "insertTitle": {
  32. "value": "Choose your favourite sport"
  33. },
  34. "height": "600px",
  35. "width": "600px"
  36. },
  37. "imagePlaceholder": {
  38. "url": "/images/icons/icon.png"
  39. }
  40. }
  41. ],
  42. "webItems": [
  43. {
  44. "url": "/my-web-item",
  45. "location": "system.preset.filters",
  46. "context": "addon",
  47. "weight": 200,
  48. "target": {
  49. "type": "page",
  50. "options": {}
  51. },
  52. "styleClasses": [
  53. "webitem",
  54. "system-present-webitem"
  55. ],
  56. "tooltip": {
  57. "value": "Example tooltip"
  58. },
  59. "icon": {
  60. "width": 16,
  61. "height": 16,
  62. "url": "/maps/icon.png"
  63. },
  64. "key": "web-item-example",
  65. "name": {
  66. "value": "My Web Item"
  67. }
  68. }
  69. ]
  70. }

Now the log which I see after running command "node app.js" is given below.
  1. root@vikash:~/atlas-projects/onDemand/ondemand-plugin$ node app.js
  2. Watching atlassian-connect.json for changes
  3. Initialized memory storage adapter
  4. Add-on server running at http://localhost:3000
  5. Registering add-on...
  6. GET /atlassian-connect.json 200 5ms - 2.22kb
  7. Registered with host jira:8680dc0e-4f86-4162-afd2-e8abbc5a18a1 at http://localhost:2990/jira
  8. Registered with host Confluence:1964677261 at http://localhost:1990/confluence
  9. GET /atlassian-connect.json 200 3ms - 2.22kb
  10. POST /enabled?user_id=admin&user_key=ff8080814624bfd7014624c00ef60003 404 2ms
  11. Saved tenant details for Confluence:1964677261 to database
  12. { key: 'ondemand-plugin-key',
  13. clientKey: 'Confluence:1964677261',
  14. publicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCl1yvBetks8pYbshWA29fJ1Xsj3xrZR1d42ZUtvhsWSefMZj/pgOWY1vAqwRvkId11KQHJsdGJ88bbgSsv8zHSqSNqTlKV+HywR2/MYfqLhdob3NzeCCfafspncJ5cTPYJLRvVrAtYARwyuAxAKgWuRqoURdEbImjiYLi6IWNA2QIDAQAB',
  15. sharedSecret: '6459a359-3523-46bd-9a92-40ba9afb7ade',
  16. serverVersion: '5109',
  17. pluginsVersion: '1.0.2',
  18. baseUrl: 'http://localhost:1990/confluence',
  19. productType: 'confluence',
  20. description: 'host.consumer.default.description',
  21. eventType: 'installed' }
  22. POST /installed?user_key=ff8080814624bfd7014624c00ef60003 204 9ms
  23. POST /enabled?user_id=admin&user_key=ff8080814624bfd7014624c00ef60003 404 1ms
Its enabled for confluence but not for jira.
if I remove dynamicContentMacros and leave webitem alone then it gets enabled for jira as well.
But not working for both the hosts jira and confluence at a time.
Please help.
Thanks,
vikash

1 answer

1 accepted

Can not achive in a single descriptor.

Ended up creating two different ondemad plugin for both confluence and jira.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,981 views 12 18
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
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