Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I handle multiple Jira apps with same source code?

Karthik BS
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 14, 2023

I have two Jira add-ons that have almost the same functionalities but different user interfaces. I would like to use the same source code for both but different descriptors.

I am using spring-boot

<dependency>
<groupId>com.atlassian.connect</groupId>
<artifactId>atlassian-connect-spring-boot-starter</artifactId>
<version>${atlassian-connect-spring-boot.version}</version>
</dependency>
<dependency>
<groupId>com.atlassian.connect</groupId>
<artifactId>atlassian-connect-spring-boot-jpa-starter</artifactId>
<version>${atlassian-connect-spring-boot.version}</version>
</dependency>

and my descriptor looks like:

{
  "key": "${addon.app1-key}",
  "baseUrl": "${addon.app1-base-url}",
  "name": "app1",
  "authentication": {
    "type": "jwt"
  },
  "lifecycle": {
    "installed": "/installed",
    "uninstalled": "/uninstalled"
  },
  "modules": {
    "generalPages": [
      {
        "key": "landing-page",
        "location": "system.top.navigation.bar",
        "name": {
          "value": "app1"
        },
        "url": "/collaboratorlogin",
        "conditions": [
          {
            "and": [
              {
                "condition": "user_is_admin",
                "invert": true
              }
            ]
          },
          {
            "condition": "user_is_logged_in"
          }
        ]
      },
      {
        "key": "admin-page",
        "location": "system.top.navigation.bar",
        "name": {
          "value": "Manage app1"
        },
        "url": "/adminpage",
        "conditions": [
          {
            "condition": "user_is_admin"
          }
        ]
      }
    ],
    "postInstallPage": {
      "url": "/home",
      "name": {
        "value": "Home Page",
        "i18n": "homepage.name"
      },
      "key": "home-page"
    },
    "webhooks": [
      {
        "event": "jira:issue_created",
        "url": "/wh/issue_created"
      },
      {
        "event": "jira:issue_updated",
        "url": "/wh/issue_updated"
      }
    ]
  },
  "scopes": [
    "READ",
    "ADMIN",
    "WRITE",
    "ACT_AS_USER"
  ]
}

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events