PHPackages                             jedi58/jira-integration - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. jedi58/jira-integration

ActiveLibrary[CLI &amp; Console](/categories/cli)

jedi58/jira-integration
=======================

Jira Integration component with console application

3.3.0(5mo ago)72211MITPHPPHP &gt;=7.1

Since Apr 7Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/jedi58/jira-integration)[ Packagist](https://packagist.org/packages/jedi58/jira-integration)[ Docs](https://github.com/jedi58/jira-integration)[ RSS](/packages/jedi58-jira-integration/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (15)Used By (0)

JiraIntegration
===============

[](#jiraintegration)

[![Build Status](https://camo.githubusercontent.com/d1e999f5525dfecf53faa401dc44b1c6df7dd09420dd90f46e832fa77933e27b/68747470733a2f2f7472617669732d63692e6f72672f6a65646935382f6a6972612d696e746567726174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jedi58/jira-integration)[![StyleCI](https://camo.githubusercontent.com/05decea915a69e6f0c4423ef5e50cc328fa65751d639f535840504e66b0ece60/68747470733a2f2f7374796c6563692e696f2f7265706f732f35303435303838362f736869656c64)](https://styleci.io/repos/50450886)[![Code Climate](https://camo.githubusercontent.com/2d3147c1abac65283ea0cee834d2cfd2c51653f1fd89f71a339d63432bfe88f3/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6a65646935382f4a697261496e746567726174696f6e2f6261646765732f6770612e737667)](https://codeclimate.com/github/jedi58/JiraIntegration)[![Coverage Status](https://camo.githubusercontent.com/a31ec6eaeec1e534e2a51198d8f1466fa07e48033ba7c4556ea34d0d88fb60db/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6a65646935382f6a6972612d696e746567726174696f6e2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/jedi58/jira-integration?branch=master)

A PHP component for interacting with the Atlassian Jira API, issue and project tracking software used by Agile teams.

The idea behind this class is that you can use this to pull out information to be used on your own website(s), or have your own web applications interact with it. The Jira API documentation this is developed against is:

Standalone Installation
-----------------------

[](#standalone-installation)

To install you can either use one of the release packages or a clone of this repository. Once extracted or cloned, you can then run:

```
./install.sh
```

This will run `composer install` (downloading Composer if you don't have it) and will set the correct permissions on the console application. It will then be possible to use the console application to interact with the Jira API. Using the `--help` switch will provide a list of available commands.

Using Composer
--------------

[](#using-composer)

If you want to use this as part of your own project then simply add this to your `composer.json` using:

```
composer require jedi58/jira-integration
```

This will then add the requirement to your composer file.

Console Application
-------------------

[](#console-application)

1. [General Usage](#consoleUsage)
2. [Prompting for Custom Fields](#customFields)

### General Usage

[](#general-usage)

The console application can be run from the project root by running `./app/console`. Running this will provide a list of available commands such as `issue:create`. If you find yourself using the console application frequently it may be worth considering using something such as `ln -s /app/console /usr/local/bin/jiraticket` so that it can be run from anywhere as `jiraticket`.

The current list of commands are:

```
 comment
  comment:create   Adds a comment to a specified Jira ticket
  comment:get      Fetches details all comments for a specific Jira issue identified by it's key. e.g. DEMO-1234
 connection
  connection:test  Tests the connection to the Jira API
 issue
  issue:create     Creates a new Jira ticket and returns the unique key
  issue:get        Fetches details of a specific Jira issue specified by it's key. e.g. DEMO-1234
  issue:search     Search using JQL for an array of Jira issues

```

### Prompting for Custom Fields

[](#prompting-for-custom-fields)

When using the console application you can prompt for customfield question from Jira by updating the `jira.yml` configuraiton file to include the customfield ID as specified by Jira, the type of question (ChoiceQuestion or Question), and any help hint text (optional).

```
custom:
  customfield_12345:
    type: ChoiceQuestion
    help: This is a question that will display allowed values to chose from
  customfield_67890:
    type: Question
```

The above example shows both types of quesitons and how they can be configured.

Usage
-----

[](#usage)

1. [Providing authentication details for the Jira API](#authentication)
2. [Creating a ticket (Simple)](#createSimple)
3. [Creating a ticket](#create)
4. [Updating a ticket](#update)
5. [Adding comments to tickets](#addComment)
6. [Retrieving a specific ticket](#getTicket)
7. [Retrieving a list of all projects](#getAllProjects)
8. [Retrieving a list of all issue types](#getAllIssueTypes)
9. [Retrieving available config options for a project](#getProjectIssueAvailableConfig)
10. [Retrieving a custom field](#getCustomFieldOption)
11. [Retrieve a list of assignable users](#getAssignableUsers)

### Providing authentication details for the Jira API

[](#providing-authentication-details-for-the-jira-api)

All Jira API functions require themselves to be authenticated. Your application must first use the `Authentication` object to provide these details.

```
$auth = Authentication::getInstance(
    'https://jira.atlassian.com'
    'user',
    'password'
);
```

These details will then be automatically used when utilising any of the below objects.

### Creating a ticket (Simple)

[](#creating-a-ticket-simple)

Creates a new ticket and assigns it to the specified project (in the below example this is `DEMO`).

```
$case = Issue::getInstance()->simpleCreate(
    'DEMO',
    'A test ticket',
    'There is an issue here - please fix it',
    'Bug',
    [
        'originalEstimate' => '1d 2h 25m'
        'remainingEstimate' => ''
    ]
);
```

This can also take optional parameters for setting the type of ticket, time tracking, and any other additional options in an array.

### Creating a ticket

[](#creating-a-ticket)

This is a more versatile version of the function for creating a ticket in Jira. It will only take an array as it's parameter and expects you to pass in everything required.

```
$case_id = Issue::getInstance()->create(['fields' => [
    'project' => [
        'key' => 'DEMO'
    ],
    'summary' => 'A test ticket',
    'description' => 'There is an issue here - please fix it',
    'issuetype' => [
        'name' => 'Bug'
    ]
]]);
```

As with the `simpleCreate` function this will return an stClass containing the ID of the ticket that has been created.

### Updating a ticket

[](#updating-a-ticket)

This is a more versatile way of updating a ticket's properties - all changes must be passed in to the array.

```
$case = Issue::getInstance()->update('DEMO-1234', ['fields' => [
    'summary' => 'This is the new description of the ticket'
]]);
```

### Deleting a ticket

[](#deleting-a-ticket)

If a ticket has sub-tasks then it will be necessary to pass `true` into this function also in order to confirm that they should be removed.

```
$case = Issue::getInstance()->delete('DEMO-1234');
```

### Retrieving a specific ticket

[](#retrieving-a-specific-ticket)

This will return an `StdClass` object containing the ticket and all it's properties.

```
$ticket = Issue::getInstance()->get('DEMO-123');
```

### Adding comments to tickets

[](#adding-comments-to-tickets)

This will add a comment to the ticket.

```
Comment::getInstance()->create('DEMO-123', 'This is a comment!', [
    'type' => 'role',
    'value' => 'Administrators'
]);
```

The result returned is an array with the only element being the timestamp the comment was added. The array in this example represents the visibility of the comment and is optional.

### Retrieving a list of all projects

[](#retrieving-a-list-of-all-projects)

```
$projects = Project::getInstance()->getAll();
```

### Retrieving a list of all issue types

[](#retrieving-a-list-of-all-issue-types)

```
$issue_types = Issue::getInstance()->getIssueTypes();
```

### Retrieving available config options for a project

[](#retrieving-available-config-options-for-a-project)

```
$available_config = Issue::getInstance()->getProjectIssueAvailableConfig('SUP');
```

### Retrieving a custom field

[](#retrieving-a-custom-field)

```
$custom = Issue::getInstance()->getCustomFieldOption(1);
```

### Retrieve a list of assignable users

[](#retrieve-a-list-of-assignable-users)

```
$users = User::getInstance()->getAll();
```

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance74

Regular maintenance activity

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 99.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~270 days

Recently: every ~64 days

Total

14

Last Release

171d ago

Major Versions

1.6.0 → 2.0.02019-06-27

2.0.1 → 3.0.02025-03-06

PHP version history (2 changes)1.0.0PHP &gt;=5.5.9

3.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/3289445da9b8e1b2006149336a3d9700471e98095881635adebdb9760bc7c471?d=identicon)[jedi58](/maintainers/jedi58)

---

Top Contributors

[![jedi58](https://avatars.githubusercontent.com/u/99506?v=4)](https://github.com/jedi58 "jedi58 (131 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

Agilejiraatlassian

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jedi58-jira-integration/health.svg)

```
[![Health](https://phpackages.com/badges/jedi58-jira-integration/health.svg)](https://phpackages.com/packages/jedi58-jira-integration)
```

###  Alternatives

[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M1.9k](/packages/behat-behat)[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.8k13.9k](/packages/crazywhalecc-static-php-cli)[phpcr/phpcr-shell

Shell for PHPCR

721.3M8](/packages/phpcr-phpcr-shell)[madewithlove/license-checker

CLI tool to verify allowed licenses for composer dependencies

54449.8k21](/packages/madewithlove-license-checker)[thecatontheflat/atlassian-connect-bundle

Atlassian Connect Symfony Bundle

357.6k](/packages/thecatontheflat-atlassian-connect-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
