Testing licensing in development v.s production environment

Hello everyone,
I have question related to testing license for the cloud ACE add-on. Can we test the license in development mode, and if everything will be ok, can we consider that we won’t have any problems with the license status in production mode? Or maybe you recommend that the testing of the license should be only in production mode?

@Ivana1

It is OK to test licensing lifecycle in dev mode. I would even strongly suggest it.

You can achieve this by registering as vendor on Atlassian Marketplace and creating your app as private listing. This way you will be able to install application directly from Marketplace on your Dev Jira instance (I hope you’re using one :slight_smile: ). Then you will be able to create access tokens to test various aspects of licensing lifecycle.

I would highly recommend you to read Access Tokens - Overview. It has main points covered and would be helpful in your case.

3 Likes

Thank you @ViliusZigmantas for the answer.

I begin to test the licensing lifecycle in dev mode. The access token is created and app is installed via Marketplace with private listing.

When I make request in Postman with the API bellow:
Get/rest/atlassian-connect/1/addons/{appKey}
I get the response

 "license": {
        "active": true,
        "type": "DEVELOPER",
        "evaluation": true
    },

What means the type: “DEVELOPER”?
Also another concern. In the atlassian-connect.json file I added “?lic=active” code like shown bellow:

 "configurePage": {
            "key": "config-page",
            "url": "/render/config?lic=active",
            "name": {
              "value": "Configuration page"
            }
          }   

Is this enough, or maybe the “?lic=active” should be placed on other places in the code, and should I made some specific testing about this parameter ?lic=active

@Ivana1

Based on Atlassian Connect REST API specification - response states that your dev instance has an active DEVELOPER type of license for your {appKey}. You can change its lifecycle value in “Manage Apps” section of your instance (e.g. set it to inactive or expired, see 3rd screenshot in this section for details).

Based on Atlassian Cloud Licensing your app should implement logic to check for lic parameter and provide output based on its value. In your example you are setting lic value hardcoded to active, this means that it will always be sent this way to your app configuration endpoint. I don’t think this will do what you are expecting it to do. Instead you might remove this parameter from endpoint url value and in the code check for GET parameter called lic and implement logic based on its value.

Alternative (to making logic decisions based on GET parameter) would be to use Atlassian Connect REST API call rest/atlassian-connect/1/addons/{appKey} to the instance to get current license state and base logic on it.

Good luck experimenting. Hope this makes sense. If not - let dig deeper on this issue.

This seems to be a duplicate of Testing cloud addon licensing (or other way around)?

2 Likes