traw/powermail-jira 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

traw/powermail-jira

Composer 安装命令:

composer require traw/powermail-jira

包简介

Base extension - Post powermail form submissions as jira issues

README 文档

README

Post powermail form submissions as jira issues

Installation

This is the base extension, and doesn't work on it's own - please install either https://github.com/thomasrawiel/powermail-jira-issues or https://github.com/thomasrawiel/powermail-jiraonpremise-issues

Requirements

You will need:

Also see for more configuration infos:

https://github.com/lesstif/php-JiraCloud-RESTAPI

https://github.com/lesstif/php-jira-rest-client

Configuration

(work in progress)

It is recommended to have your credentials and security related configuration values in a seperated .env file

Connecting to your Jira instance

$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['powermail_jira'] = [
    'connection' => [
        'jiraHost' => getenv('JIRAAPI_V3_HOST'),
        'jiraUser' => getenv('JIRAAPI_V3_USER'),
        'personalAccessToken' => getenv('JIRAAPI_V3_PERSONAL_ACCESS_TOKEN'),
    ],
];

Add this e.g. in your additional.php configuration file

This user will also be the author of the created issues.

Adding projects

For each project add a configuration array Each project can have multiple configurations that are by conditions

$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['powermail_jira'] = [
    'connection' => [
        'jiraHost' => getenv('JIRAAPI_V3_HOST'),
        'jiraUser' => getenv('JIRAAPI_V3_USER'),
        'personalAccessToken' => getenv('JIRAAPI_V3_PERSONAL_ACCESS_TOKEN'),
    ],
    'issues' => [
        //required. configuration key, recommended to be the same as tca value, max 20 chars if tca value is empty
        'my_project_1' => [
            'tca' => [
                //required: label for the configuration select in the powermail form backend form
                'label' => 'Service Request in Project XYZ',
                //max 20 chars, leave empty to use configuration key
                'value' => '',
            ],
            //configuration used to create issues in Jira
            'issueConfiguration' => [
               //case 1: Used as configuration if powermail_fieldname has the value 'Powermail Field Value 01'
                [
                    'project_key' => 'JiraProjectKey',
                    'type' => 'Task', //Task, Story, etc.
                    'priority' => 'High',
                    'customFields' => [
                        'customfield_10000' => ['name'=>'Group name'], //group field
                        'customfield_10001' => ['value'=>'Value'], //select field (single)
                        'customfield_10002 => [ //select field (multiple)
                            ['value'=>'Value 1'], ['value'=>'Value 2'], /
                        ],
                        'customfield_10003' => 'Simple string value',
                        new \TRAW\PowermailJira\Domain\Model\CustomFields\SimpleValueCustomField('customfield_10004', 'simple string value'),
                        new \TRAW\PowermailJira\Domain\Model\CustomFields\SimpleValueCustomField('customfield_10005', ['value'=>'Value']), //select field (single)
                        new \TRAW\PowermailJira\Domain\Model\CustomFields\SimpleValueCustomField('customfield_10006', [ //select field (multiple)
                            ['value'=>'Value 1'], ['value'=>'Value 2'], /
                        ]), //select field (multiple)
                        new \TRAW\PowermailJira\Domain\Model\CustomFields\MarkerValueCustomField('customfield_10007', 'e_mailadress_marker_name'), //field from form by markername
                        new \TRAW\PowermailJira\Domain\Model\CustomFields\MarkerValueCustomField('customfield_10008', null, 1234), //field from form by field uid
                    ],
                    'labels' => ['label1', 'label2'],
                    'conditions' => [
                        'fields' => [
                            'powermail_fieldname' => ['Powermail Field Value 01'],
                        ],
                    ],
                ],
                //Case 2: Used as configuration if powermail_fieldname has the value 'Other Powermail Field value' AND powermail_fieldname2 does not have the value 1,2 or 3
                [
                    'project_key' => 'JiraProjectKey',
                    'type' => 'Task',
                    'priority' => 'Medium',
                    'assignee' => 'Assigned Username',
                    'labels' => ['Other label'],
                    'conditions' => [
                        'fields' => [
                            'powermail_fieldname' => ['Other Powermail Field value'],
                        ],
                        'notFields' [
                            'powermail_fieldname2' => [1,2,3]
                        ]
                    ],
                ],
                //default no condition, always added if no previous configuration condition matched
                [
                    'project_key' => 'JiraProjectKey',
                    'type' => 'Task',
                    'priority' => 'Medium',
                ],
            ],
        ],
    ],
];

Hint: The project key is the prefix of the issue number. In the example of JRA-123, the "JRA" portion of the issue number is the project key.

The label and project key are required.

New with version 1.2.0/ 1.3.0 You can now add values from the form itself to custom fields by adding a MarkerValueCustomField to the custom field configuration.

See example above.

Usage

To enable posting to your Jira Board, make sure to add the static typoscript include Add Powermail Jira Issues Finisher to your page's template.

In your form, select the configuration Screenshot of the resulting selection in the powermail form

The title of the issue will be the subject of the email to the receiver, that you configure in the powermail plugin

All fields of the form will be added to the description of the issue

Uploads fields are detected automatically and files will be attached to the issue after it has been created.

This extension is work in progess and can change anytime.

traw/powermail-jira 适用场景与选型建议

traw/powermail-jira 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 185 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 08 月 30 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「jira」 「issues」 「TYPO3 CMS」 「powermail」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 traw/powermail-jira 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 traw/powermail-jira 我们能提供哪些服务?
定制开发 / 二次开发

基于 traw/powermail-jira 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2024-08-30