Is there a way to create this automation?:
If my issue, CAT-1 is linked to DOG-1, then also link my CAT-1 to DOG-2.
Result:
CAT-1 relates to DOG-1
CAT-1 relates to DOG-2
Please post your code snippet and we will be able to help!
library that is used is: https://github.com/lesstif/php-jira-rest-client
class Jira extends Controller
{
private $jiraHost;
private $jiraUsername;
private $jiraPassword;
private $config;
/**
* @Route("/", name="devops_jira")
*/
public function index()
{
$this->jira_auth();
var_dump($this->config);
try {
$proj = new ProjectService($this->config);
$prjs = $proj->getAllProjects();
var_dump($prjs);
foreach ($prjs as $p) {
echo sprintf("Project Key:%s, Id:%s, Name:%s, projectCategory: %s\n",
$p->key, $p->id, $p->name, $p->projectCategory['name']
);
}
} catch (JiraException $e) {
print("Error Occured! " . $e->getMessage());
}
return new Response('');
}
public function jira_auth()
{
$user = $this->getUser();
$this->jiraHost = $user->getJiraHost();
$this->jiraUsername = $user->getJiraUsername();
$this->jiraPassword = $user->getJiraPassword();
$this->config = new ArrayConfiguration(
array(
'jiraHost' => 'https://username.atlassian.net',//$this->jiraHost,
// for basic authorization:
'jiraUser' => $this->jiraUsername,
'jiraPassword' => 'api token',//$this->jiraPassword,
// to enable session cookie authorization (with basic authorization only)
///'cookieAuthEnabled' => true,
'jiraLogFile' => 'DEBUG',
//'curlOptSslVerifyHost' => true
)
);
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.