承接 pbrasseur/jira-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pbrasseur/jira-client

Composer 安装命令:

composer require pbrasseur/jira-client

包简介

A simple PHP JIRA REST client

README 文档

README

A simple JIRA REST client for PHP.

The main or killing feature of this library is resolving custom fields of issues.

Codacy Badge

Example

$api = new JiraClient\JiraClient('http://jira.hostname', 'login', 'password');

try {
    // Get an existing issue
    $issue = $api->issue()->get('JRA-123');

    // Print the issue id.
    echo $issue->getId();

    // Print the issue key.
    echo $issue->getKey();

    // Create new issue.
    $newIssue = $api->issue()
        ->create('JIRA', 'Suggestion')
        ->field(Field::SUMMARY, 'My Suggestion')
        ->field(Field::DESCRIPTION, 'Some description')
        ->execute();

    // Print the issue id.
    echo $newIssue->getId();

    $newIssue = $newIssue->update()
        ->field(Field::DESCRIPTION, 'Some new description')
        ->customField(10012, 'Value for custom field')
        ->fieldAdd(Field::LABELS, 'new-label')
        ->execute();

    // Print description of updated issue.
    echo $newIssue->getDescription();

    // Two ways for adding new comment.
    $newIssue->addComment("Some comment content");
    $api->issue()->addComment($newIssue->getKey(), "Another comment content");

    // Add new comment limited to the developer role.
    $newIssue->addComment("Only for developers", "role", "Developers");

    // Get reporter's name.
    $reporterName = $newIssue->getReporter()->getName();

    // Get an array of labels.
    $labels = $newIssue->getLabels();

    // Get an array of transitions for issue
    $transitions = $api->issue()->getTransitions($newIssue->getKey());

    // Executing transitions to change issue status
    $newIssue->transition()->execute(120);
    
    // Searches for issues using JQL
    $issues = new JiraClient\Request\SearchIterator($api, "project = Test");

    // or another way
    $issues = $api->issue()->search("project = Test");

    // Total count of found issues
    $total = $issues->getTotal();

    foreach ($issues as $issue) {
        $issue->update()
            ->fieldAdd(Field::LABELS, 'new-label')
            ->execute();
    }
} catch (\JiraClient\Exception\JiraException $e) {
    // exception processing
}

Installation

composer require "pbrasseur/jira-client:dev-master"

统计信息

  • 总下载量: 19
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 17
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固