Hai all,
I am in need to create a third party integration with jira. I chose connect app after lot of discussions. Now i need to develop a postinstallpage and configurepage. I read some documents about these. but didn’t get any clarification. I will explain my requirement. If anyone know about it, kindly give your suggestions.
First i will post my code.
In atlassian-connect.json,
"postInstallPage": {
"url": "/my-post-install-page",
"name": {
"value": "My Post-Install Page",
"i18n": "mypostinstallpage.name"
},
"key": "my-post-install-page"
},
"configurePage": {
"url": "/my-config-page",
"name": {
"value": "My Configure Page"
},
"key": "configpage"
}
I added these lines under modules in atlassian-connect.json
In index.js,
app.get('/my-post-install-page', addon.authenticate(), (req, res) => {
res.render(
'postinstallpage.hbs',
{
title: 'Atlassian Connect'
}
)
});
app.get('/my-config-page', addon.authenticate(), (req, res) => {
res.render(
'configpage.hbs',
{
title: 'Atlassian Connect'
}
)
});
In postinstall.hbs file,
<!doctype html>
<html>
<head>
<script id="connect-loader" data-options="sizeToParent:true;">
(function() {
var getUrlParam = function (param) {
var codedParam = (new RegExp(param + '=([^&]*)')).exec(window.location.search)[1];
return decodeURIComponent(codedParam);
};
var baseUrl = getUrlParam('xdm_e') + getUrlParam('cp');
var options = document.getElementById('connect-loader').getAttribute('data-options');
var script = document.createElement("script");
script.src = baseUrl + '/atlassian-connect/all.js';
if(options) {
script.setAttribute('data-options', options);
}
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</head>
<body>
<h1>An introductory page</h1>
<p>Use this page to show the installer some information on how to use your add-on.</p>
</body>
</html>
When i run this code in my cloud instance, I got the buttons get started and configure.
Now my doubt is when i click the get started or configure button why it will redirect to a page with url “plugins/servlet/ac/app_name/my-config-page” and send 404 error.
Shall i missed anything to do or did i understand wrongly about the flow of using postinstallpage and configurepage? Please give a clarity in this problem.
Thanks in advance…