PHPackages                             g3r4/php-jira-rest-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. g3r4/php-jira-rest-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

g3r4/php-jira-rest-client
=========================

Fork of JIRA REST API Client for PHP to not require dontenv, uses env variables instead

1.15(8y ago)031Apache 2.0PHPPHP &gt;=5.5.9

Since Feb 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/g3r4/php-jira-rest-client)[ Packagist](https://packagist.org/packages/g3r4/php-jira-rest-client)[ RSS](/packages/g3r4-php-jira-rest-client/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (5)Versions (68)Used By (0)

PHP JIRA Rest Client
====================

[](#php-jira-rest-client)

Fork of [![Latest Stable Version](https://camo.githubusercontent.com/a021286bb2f9e3e4b215ff7dbe1e76b5dd317d55812e866ddd99e5db41af73ec/68747470733a2f2f706f7365722e707567782e6f72672f6c6573737469662f7068702d6a6972612d726573742d636c69656e742f762f737461626c65)](https://packagist.org/packages/lesstif/php-jira-rest-client)

This fork does not force you to use dotenv.

Requirements
============

[](#requirements)

- PHP &gt;= 5.5.9
- [php JsonMapper](https://github.com/netresearch/jsonmapper)
- [phpdotenv](https://github.com/vlucas/phpdotenv)

Installation
============

[](#installation)

1. Download and Install PHP Composer.

    ```
    curl -sS https://getcomposer.org/installer | php
    ```
2. Next, run the Composer command to install the latest version of php jira rest client.

    ```
    php composer.phar require lesstif/php-jira-rest-client "^1.7.0"
    ```

    or add the following to your composer.json file.

    ```
    {
        "require": {
            "g3r4/php-jira-rest-client": "^1.0"
        }
    }
    ```
3. Then run Composer's install or update commands to complete installation.

    ```
    php composer.phar install
    ```
4. After installing, you need to require Composer's autoloader:

    ```
    require 'vendor/autoload.php';
    ```

Configuration
=============

[](#configuration)

you can choose loads environment variables either 'dotenv' or 'array'.

use dotenv
----------

[](#use-dotenv)

copy .env.example file to .env on your project root.

```
JIRA_HOST="https://your-jira.host.com"
JIRA_USER="jira-username"
JIRA_PASS="jira-password"
```

**important-note:** If you are using previous versions(a prior v1.2), you should move config.jira.json to .env and will edit it.

If you are developing with laravel framework(5.x), you must append above configuration to your application .env file.

use array
---------

[](#use-array)

create Service class with ArrayConfiguration parameter.

```
use JiraRestApi\Configuration\ArrayConfiguration;
use JiraRestApi\Issue\IssueService;

$iss = new IssueService(new ArrayConfiguration(
          array(
               'jiraHost' => 'https://your-jira.host.com',
               'jiraUser' => 'jira-username',
               'jiraPassword' => 'jira-password',
          )
   ));
```

Usage
=====

[](#usage)

Table of Contents
-----------------

[](#table-of-contents)

### Project

[](#project)

- [Get Project Info](#get-project-info)
- [Get All Project list](#get-all-project-list)
- [Get Project Type](#get-project-type)
- [Get Project Version](#get-project-version)

### Custom Field

[](#custom-field)

- [Get All Field list](#get-all-field-list)
- [Create Custom Field](#create-custom-field)

### Issue

[](#issue)

- [Get Issue Info](#get-issue-info)
- [Create Issue](#create-issue)
- [Create Issue - bulk](#create-multiple-issue)
- [Create Sub Task](#create-sub-task)
- [Add Attachment](#add-attachment)
- [Update issue](#update-issue)
- [Change assignee](#change-assignee)
- [Remove issue](#remove-issue)
- [Add comment](#add-comment)
- [Perform a transition on an issue](#perform-a-transition-on-an-issue)
- [Perform an advanced search, using the JQL](#perform-an-advanced-search)
    - [Simple JQL](#simple-query)
    - [JQL With pagination](#jql-with-pagination)
- [Issue time tracking](#issue-time-tracking)
- [Add worklog in Issue](#add-worklog-in-issue)
- [Edit worklog in Issue](#edit-worklog-in-issue)
- [Get Issue worklog](#get-issue-worklog)
- [Add watcher in Issue](#add-issue-watcher)

### IssueLink

[](#issuelink)

- [Create Issue Link](#create-issue-link)
- [Get Issue LinkType](#get-issue-linktype)

### User

[](#user)

- [Get User Info](#get-user-info)
- [Find Users](#find-users)
- [Find Assignable Users](#find-assignable-users)

### Group

[](#group)

- [Create Group](#create-group)
- [Get Users from group](#get-users-from-group)
- [Add User to group](#add-user-to-group)

#### Get Project Info

[](#get-project-info)

```
