Download the PHP package jedi58/jira-integration without Composer
On this page you can find all versions of the php package jedi58/jira-integration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jedi58/jira-integration
More information about jedi58/jira-integration
Files in jedi58/jira-integration
Package jira-integration
Short Description Jira Integration component with console application
License MIT
Homepage https://github.com/jedi58/jira-integration
Informations about the package jira-integration
JiraIntegration
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: https://docs.atlassian.com/jira/REST/latest/
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:
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
If you want to use this as part of your own project then simply add this to your composer.json
using:
This will then add the requirement to your composer file.
Console Application
- General Usage
- Prompting for Custom Fields
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 <path-to-project>/app/console /usr/local/bin/jiraticket
so that it can be run from anywhere as jiraticket
.
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).
The above example shows both types of quesitons and how they can be configured.
Usage
- Providing authentication details for the Jira API
- Creating a ticket (Simple)
- Creating a ticket
- Updating a ticket
- Adding comments to tickets
- Retrieving a specific ticket
- Retrieving a list of all projects
- Retrieving a list of all issue types
- Retrieving available config options for a project
- Retrieving a custom field
- Retrieve a list of assignable users
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.
These details will then be automatically used when utilising any of the below objects.
Creating a ticket (Simple)
Creates a new ticket and assigns it to the specified project (in the below example this is DEMO
).
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
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.
As with the simpleCreate
function this will return an stClass containing the ID of the ticket that has been created.
Updating a ticket
This is a more versatile way of updating a ticket's properties - all changes must be passed in to the array.
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.
Retrieving a specific ticket
This will return an StdClass
object containing the ticket and all it's properties.
Adding comments to tickets
This will add a comment to the ticket.
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 issue types
Retrieving available config options for a project
Retrieving a custom field
Retrieve a list of assignable users
All versions of jira-integration with dependencies
ext-curl Version *
ext-json Version *
symfony/console Version *
symfony/yaml Version ^3.2