diff --git a/src/Connector/JiraConnector.php b/src/Connector/JiraConnector.php index de7fc35..8f05bfe 100644 --- a/src/Connector/JiraConnector.php +++ b/src/Connector/JiraConnector.php @@ -80,6 +80,13 @@ class JiraConnector implements Connector, ConfigurableService { */ protected $nonBillableProjects = []; + /** + * Configuration. + * + * @var array + */ + protected $config = []; + /** * Constructs a new JiraConnector. * @@ -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; @@ -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( @@ -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); } /**