Gobinath,
Can you verify with us what product you're developing for? I'd like to make sure to tag this properly so it can be seen
Regards,
Shannon
I am also facing same issue. I am developing the JIRA Cloud Instance add-on using Atlassian-Connect Express. please resolve this issues. Cannot able to find much info on this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sarthak,
Have you reported this issue at Ecosystem or our Developer Community yet? These are the resources you would use to report an issue or a problem you're having developing an add-on.
Let me know if you have any trouble!
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Shannon S,
Apologize, I have overlooked your reply.
I managed to solve it by installing following NodeJS packages:
// add the following route handler in routes/index.js
app.post('/installed', function(req, res) {
console.log('Installed [Callback] :', req.body); //Update AddonSettings Table
addon.settings.set('clientInfo', req.body, req.body.clientKey); //this the part manually added as part of workaround to register app
infoLog.info('[Installed Callback] Successfuly Installed in JIRA [Request Body:' + JSON.stringify(req.body) + ']');
res.status(200).send();
});
Also, in path "/node_modules/atlassian-connect-express/lib/store/jugglingdb.js", you can customize the table to store the addOnSettings which store the key to decrypt the JWT token. Importantly, the table need to have fields like "id,clientKey,key,val".
e.g
function JugglingDB(logger, opts) { opts = opts || {}; var self = this; self._data = {}; self.promise = new RSVP.Promise(function(resolve,reject) { var type = opts.type || 'memory'; var schema = self.schema = new Schema(type, opts); schema.extend('AddonSettings', { clientKey: { type: String, index: true }, key: { type: String, index: true }, val: Schema.JSON }, { table:'JIRA_AddOnSettings'}).then( function (AddonSettings) { return new RSVP.Promise(function(resolve) { AddonSettings.schema.autoupdate(function() { resolve(AddonSettings); }); }); }) .then(function(AddonSettings) { self._AddonSettings = AddonSettings; logger.info('Initialized ' + type + ' storage adapter'); resolve(); }, function (err) { logger.error('Failed to initialize ' + type + ' storage adapter: ' + errmsg(err)); reject(err); } ); }); _.bindAll(self, 'get', 'set', 'del');}
And,configuration for "store" object in "config.json" should be something like this:
"store": { "adapter": "jugglingdb", "type": "mysql", "host": "127.0.0.1", "username": "root", "password": "", "database": "jira_plugin" },
With all these changes, I managed to get it work!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.