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
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events