Bitzsoft.Integrations.ProjectManagement.JiraCloud
1.0.1
dotnet add package Bitzsoft.Integrations.ProjectManagement.JiraCloud --version 1.0.1
NuGet\Install-Package Bitzsoft.Integrations.ProjectManagement.JiraCloud -Version 1.0.1
<PackageReference Include="Bitzsoft.Integrations.ProjectManagement.JiraCloud" Version="1.0.1" />
<PackageVersion Include="Bitzsoft.Integrations.ProjectManagement.JiraCloud" Version="1.0.1" />
<PackageReference Include="Bitzsoft.Integrations.ProjectManagement.JiraCloud" />
paket add Bitzsoft.Integrations.ProjectManagement.JiraCloud --version 1.0.1
#r "nuget: Bitzsoft.Integrations.ProjectManagement.JiraCloud, 1.0.1"
#:package Bitzsoft.Integrations.ProjectManagement.JiraCloud@1.0.1
#addin nuget:?package=Bitzsoft.Integrations.ProjectManagement.JiraCloud&version=1.0.1
#tool nuget:?package=Bitzsoft.Integrations.ProjectManagement.JiraCloud&version=1.0.1
Bitzsoft.Integrations.ProjectManagement.JiraCloud
Jira Cloud 项目管理适配器,将 IProjectManagementService 统一抽象适配到 Bitzsoft.Integrations.JiraCloud 单体。
设计说明
该适配器委托 IJiraCloudClient(JiraCloud 单体的只读 Issue client)执行实际调用。
JiraCloud 单体的 client 仅暴露 Issue 读取与受控 JQL 搜索能力,不提供项目创建/列表或 Issue 写入方法。
能力矩阵
| IProjectManagementService 方法 | 支持 | 实现方式 |
|---|---|---|
CreateProjectAsync |
否 | 抛出 NotSupportedException(请使用 Jira 管理界面) |
ListProjectsAsync |
否 | 抛出 NotSupportedException(需 Admin API) |
CreateTaskAsync |
否 | 抛出 NotSupportedException(只读 client 不支持创建) |
GetTaskAsync |
是 | IJiraCloudClient.GetIssueAsync |
UpdateTaskAsync |
否 | 抛出 NotSupportedException(只读 client 不支持更新) |
CompleteTaskAsync |
否 | 抛出 NotSupportedException(只读 client 不支持 transition) |
ListTasksAsync |
是 | IJiraCloudClient.SearchIssuesAsync(受控 JQL,按 project + status 过滤) |
写入类操作请直接使用 Jira REST API 写入端点或 Jira 管理界面。
安装
dotnet add package Bitzsoft.Integrations.ProjectManagement.JiraCloud
注册服务
宿主需先通过 JiraCloud 单体注册 IJiraCloudClient,再注册适配器:
// 1. 注册 JiraCloud 单体(提供 IJiraCloudClient)
services.AddBitzsoftJiraCloud(endpointProfile, issuePolicies, webhookPolicies, webhookReceivers);
// 2. 注册 PM 适配器(固定上下文)
var context = new JiraCloudRequestContext(
tenantId: "tenant-1",
authorizationSubject: "operator-user");
services.AddJiraCloudProjectManagement(context);
// 或使用自定义上下文工厂(多租户推荐)
services.AddJiraCloudProjectManagement<TenantJiraCloudContextFactory>();
IJiraCloudPmContextFactory
IJiraCloudClient 的所有方法都需要 JiraCloudRequestContext(绑定租户、profile、授权主体)。
适配器通过 IJiraCloudPmContextFactory 获取该上下文。多租户宿主应实现该接口,
从 IIntegrationContextAccessor 与凭据解析器动态构造;单租户或测试可使用固定上下文。
使用示例
public class TaskQueryService
{
private readonly IProjectManagementService _pm;
public TaskQueryService(IProjectManagementService pm)
=> _pm = pm;
public Task<PmTask> GetTaskAsync(string issueKey)
=> _pm.GetTaskAsync(issueKey); // 例如 "PROJ-123"
public Task<List<PmTask>> ListTasksAsync(string projectKey)
=> _pm.ListTasksAsync(new ListTasksRequest { ProjectId = projectKey });
}
依赖
| 包 | 说明 |
|---|---|
| Bitzsoft.Integrations.ProjectManagement | 项目管理服务抽象层 |
| Bitzsoft.Integrations.JiraCloud | Jira Cloud 单体(提供 IJiraCloudClient) |
| Bitzsoft.Integrations.Core | 公共基座 |
| Bitzsoft.Integrations.Compatibility | 多 TFM 兼容工具 |
| Bitzsoft.Integrations.RequestLogging | 出站请求审计日志 |
相关包
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.1)
- Bitzsoft.Integrations.Core (>= 1.0.1)
- Bitzsoft.Integrations.JiraCloud (>= 1.0.1)
- Bitzsoft.Integrations.ProjectManagement (>= 1.0.1)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
-
net5.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.1)
- Bitzsoft.Integrations.Core (>= 1.0.1)
- Bitzsoft.Integrations.JiraCloud (>= 1.0.1)
- Bitzsoft.Integrations.ProjectManagement (>= 1.0.1)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 5.0.0)
- Microsoft.Extensions.Options (>= 5.0.0)
-
net8.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.1)
- Bitzsoft.Integrations.Core (>= 1.0.1)
- Bitzsoft.Integrations.JiraCloud (>= 1.0.1)
- Bitzsoft.Integrations.ProjectManagement (>= 1.0.1)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.