How to determine plugin is in Free Trial through PluginLicenseManager

I have a plugin with licensing, which works fine with the timebomb licences. But when I do a fresh install on my developer instance, I get the "Free Trial" licence - by my thinking, in free trial everything should work just like in the paid version.

But here comes my problem, how do I actually determine that the plugin is in the free trial? I use this function to determine if the plugin is licensed:

private Boolean isLicenceOK() {
if (pluginLicenseManager.getLicense().isDefined()) {
PluginLicense pluginLicense = pluginLicenseManager.getLicense().get();
return !pluginLicense.getError().isDefined();
} else {
return false;
}
}

Which works fine when I have/dont have a license. But when the plugin is in the free trial, it just says there is no license.

So is there a way to find out if the plugin is currently in the free trial?

1 answer

1 accepted

0 vote

Hi Ivana,

You should be able to see this information in the Manage Add-Ons page:

Screen Shot 2018-01-03 at 9.44.36 AM.png

 

See the License Details section:

License details:

Evaluation, Unlimited-user commercial license, Standard, expires 02/Feb/18

You can also tell from the description paragraph this is a trial:

Your trial is expiring on 02/Feb/18.  Buy a license for this add-on.

Cheers,

Branden

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

167 views 1 17
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