Skip to content

Commit

Permalink
jira-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
larowlan committed May 14, 2019
1 parent 5f60b77 commit 589d264
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Connector/JiraConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ class JiraConnector implements Connector, ConfigurableService {
*/
protected $nonBillableProjects = [];

/**
* Configuration.
*
* @var array
*/
protected $config = [];

/**
* Constructs a new JiraConnector.
*
Expand All @@ -106,6 +113,7 @@ public function __construct(array $configuration, Cache $cache, array $config, $
$this->issueService = new IssueService($arrayConfiguration);
$this->projectService = new ProjectService($arrayConfiguration);
$this->cache = $cache;
$this->config = $configuration;
$this->userName = $configuration['jira_username'];
$this->version = $version;
$this->httpClient = $httpClient;
Expand Down Expand Up @@ -222,7 +230,7 @@ public function ticketDetails($id, $connectorId) {
catch (JiraException $e) {
try {
// Check if we're offline.
$this->httpClient->request('GET', self::JIRA_URL);
$this->httpClient->request('GET', $this->config['jira_url']);
}
catch (ConnectException $e) {
return new Ticket(
Expand Down Expand Up @@ -286,7 +294,7 @@ public function sendEntry($entry) {
public function ticketUrl($id, $connectorId) {
$id = $this->loadAlias($id, $connectorId);
$issue = $this->issueService->get($id);
return sprintf('%s/browse/%s', self::JIRA_URL, $issue->key);
return sprintf('%s/browse/%s', $this->config['jira_url'], $issue->key);
}

/**
Expand Down

0 comments on commit 589d264

Please sign in to comment.