Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

lifecycle hock is not receiving any payload

Creatros July 5, 2018

Hello Everyone.

I am new to jira plugin development. I am trying to create a hello world plugin with a read write access. I was using PHP for the back end just for a quick play around. My installed hock is fired by installation process, however, my POST variable (the payload) is empty. I suppose, it should contain some information  and not sure why I am not receiving it.

 

Here is the the json file

 

{
"name": "JIRA Connect 2",
"description": "Test from",
"key": "aut2.jiraplugin.mydomain.ca",
"baseUrl": "https://ab5c7641.ngrok.io/creatros-jira",
"scope":[
"read","write"
],
"vendor": {
"name": "our company Inc.",
"url": "http://mydomain.ca"
},

"authentication": {
"type": "JWT"
},
"lifecycle":{
"installed":"/jwtSave.php"
},
"apiVersion": 1,
"modules": {
"jiraProjectPages": [
{
"key": "query-test",
"name": {
"value": "Search Users"
},
"url": "/query.html?projectKey=${project.key}",
"iconUrl": "/search-user.png",
"weight": 0
}
]
}
}

 

 

And the jwtSave.php as following

 

<?php
ob_start();
var_dump($_REQUEST);
print_r($_POST);
print_r($_GET);
print_r($_SERVER);
$result = ob_get_clean();

file_put_contents(date("U").'-.txt', $result );

 

and for the print_r($_POST) statement i am getting 

 

Array()  <- an empty array. Nothing sent.

 

Any help will be greatly appriciated.

1 answer

1 accepted

0 votes
Answer accepted
Creatros July 5, 2018

I found a solution at https://stackoverflow.com/questions/18866571/receive-json-post-with-php 

 

Thanks everyone for your attention.

Suggest an answer

Log in or Sign up to answer