Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/device/4-device-collector.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ sidebar_position: 4

![org-dev-rule-save](./img/4-3-device-save-collector.png)

## 数采规则格式详解
## 数采规则格式详解 {#device-collector-format}

数采规则主要对 5 个模块进行设置:

| 模块名称 | 功能描述 |
| --------------------------- | -------------------------------------------------------------- |
| 数据收集器设置(collector) | 完成数据采集后,是否删除数采客户端在设备端生成的缓存数据 |
| 数据收集器设置(collector) | 完成数据采集后,是否删除数采客户端在设备端生成的缓存数据 |
| 存储设置(mod) | 设备 ID 存放位置;监听目录;客户端初始化监听时间范围;采集目录 |
| 设备事件属性(device) | 事件的属性值 |
| 规则触发话题(topic) | 规则触发话题 |
| 更新设置(updater) | 数采客户端是否开启自动更新 |
| 更新设置(updater) | 数采客户端是否开启自动更新 |

示例模板如下:

Expand Down
4 changes: 2 additions & 2 deletions docs/use-case/data-diagnosis/2-get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sidebar_position: 2

1. 请准备好一台设备

2. 请创建名为 auto-upload 的项目,详情参见[创建新项目](https://docs.coscene.cn/docs/recipes/project)。
2. 请创建名为 auto-upload 的项目

3. 请确认你在 coScene 的组织角色为「管理员」。若不是管理员,请联系组织管理员更新你的组织角色。

Expand Down Expand Up @@ -96,7 +96,7 @@ sidebar_position: 2
enabled: false
```

\*更多配置参见[数采规则格式](https://docs.coscene.cn/docs/recipes/device/device-collector/#%E6%95%B0%E9%87%87%E8%A7%84%E5%88%99%E6%A0%BC%E5%BC%8F)
更多配置参见[数采规则格式](../../device/4-device-collector.md#device-collector-format)

3. 点击【保存编辑】按钮

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ name: string;

```typescript
sourceTopicName: string;
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ TopicAliasFunction 接收数据源主题和变量列表,并输出别名主题

## 参数

| 参数 | 类型 |
| --- | --- |
| 参数 | 类型 |
| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| args | [Immutable](../6-other/2-immutable.md)\<\{ topics: [BaseTopic](./1-base-topic.md)[]; globalVariables: Readonly\<Record\<string, [VariableValue](../6-other/8-variable-value.md)\>\>; \}\> |

## 返回值

TopicAlias[]
TopicAlias[]
4 changes: 2 additions & 2 deletions docs/viz/8-extensions/5-api/6-other/2-immutable.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ type Immutable<Type> = Type extends Exclude<Builtin, Error> ? Type : Type extend
## 类型参数

| 类型参数 |
| -------------- |
| Type |
| -------- |
| Type |
2 changes: 0 additions & 2 deletions docs/viz/8-extensions/5-api/6-other/8-variable-value.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ sidebar_position: 8
```typescript
type VariableValue = undefined | boolean | number | string | VariableValue[] | {};
```

变量的有效类型
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { themes } from 'prism-react-renderer';
const defaultExclude = ['**/_*.{js,jsx,ts,tsx,md,mdx}', '**/_*/**', '**/*.test.{js,jsx,ts,tsx}', '**/__tests__/**'];

// some docs are not translated, so we need to exclude them in en
const excludeInEn = ['**/viz/8-extensions/**', '**/viz/9-message-schemas/**'];
const excludeInEn = [];

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down
8 changes: 7 additions & 1 deletion i18n/en/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -598,5 +598,11 @@
},
"home.catalogue.apt-source-install": {
"message": "Installing coScene Software via APT"
},
"home.catalogue.extensions": {
"message": "Extensions"
},
"home.catalogue.message-schemas": {
"message": "Message Schemas"
}
}
}
44 changes: 42 additions & 2 deletions i18n/en/docusaurus-plugin-content-docs/current.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"sidebar.tutorialSidebar.category.新手入门": {
"message": "Getting Started",
"description": "The label for category 快速开始 in sidebar tutorialSidebar"
"description": "The label for category 新手入门 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.协作": {
"message": "Collaboration",
Expand Down Expand Up @@ -117,6 +117,46 @@
},
"sidebar.tutorialSidebar.category.客户端": {
"message": "Desktop Apps",
"description": "The label for category 客户端 in the sidebar"
"description": "The label for category 客户端 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.插件": {
"message": "Extensions",
"description": "The label for category 插件 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.最佳实践": {
"message": "Best Practices",
"description": "The label for category 最佳实践 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.指南": {
"message": "Guide",
"description": "The label for category 指南 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.API 参考": {
"message": "API References",
"description": "The label for category API 参考 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.入口": {
"message": "Entry Point",
"description": "The label for category 入口 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.自定义面板": {
"message": "Custom Panels",
"description": "The label for category 自定义面板 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.消息转换器": {
"message": "Message Converters",
"description": "The label for category 消息转换器 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.话题别名": {
"message": "Topic Aliases",
"description": "The label for category 话题别名 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.其他": {
"message": "Others",
"description": "The label for category 其他 in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.消息架构": {
"message": "Message Schema",
"description": "The label for category 消息架构 in sidebar tutorialSidebar"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,61 +3,65 @@ sidebar_position: 1
---

# Jira Integration

## Introduction

After configuring Jira integration, you can synchronize project tasks to Jira for unified task management on the enterprise ticketing platform. Here are typical use cases:

1. When device issues occur, automatically upload data and create tasks in Jira
2. During data visualization analysis, create tasks at key timestamps and sync them to Jira

## Operation Process

### Configure Integration

> Each project is configured independently, and only project administrators can edit

1. Enter the project that needs integration configuration, go to Project Settings - Service Integration - Jira, and click the [Add Config] button.

![jira_1](./img/jira_1.png)
![jira_1](./img/jira_1.png)

2. Fill in the integration configuration and save. Field descriptions are as follows:

```yaml
enabled: true # Enable configuration

endpoint: https://jira.com/ # Jira URL
httpBasicAuthorization:
usernameAndPassword:
username: root # Jira username
password: admin # Jira password

projectKey: TEST # Jira project Key
issueType: 'Bug' # Jira issue type
issueTitleTemplate: '{{task.title}}' # Jira issue title, e.g., task name
issueDescriptionTemplate: | # Issue description
[Task Name]: {{task.title}}
[Device ID]: {{device.id}}
[Record Link]: {{record.link}}

customFields: # Issue custom fields
customfield_1:
id: '88888' # Field 1 (dropdown style), select option with id 88888
customfield_2: TEST # Field 2 (text box style), enter content as TEST
customfield_3: # Field 3, enter P1
value: P1
```
```yaml
enabled: true # Enable configuration

endpoint: https://jira.com/ # Jira URL
httpBasicAuthorization:
usernameAndPassword:
username: root # Jira username
password: admin # Jira password

projectKey: TEST # Jira project Key
issueType: 'Bug' # Jira issue type
issueTitleTemplate: '{{task.title}}' # Jira issue title, e.g., task name
issueDescriptionTemplate: | # Issue description
[Task Name]: {{task.title}}
[Device ID]: {{device.id}}
[Record Link]: {{record.link}}

customFields: # Issue custom fields
customfield_1:
id: '88888' # Field 1 (dropdown style), select option with id 88888
customfield_2: TEST # Field 2 (text box style), enter content as TEST
customfield_3: # Field 3, enter P1
value: P1
```

- **enabled**

Jira integration status, enable/disable (true/false). Enabled by default, when disabled tasks cannot be synced to Jira

- **endpoint**

Jira URL, e.g., `https://www.atlassian.com/`

- **username**

Jira username, used to create issues and get issue information in Jira projects with this user's identity

- **password**

Password corresponding to the Jira username

- **projectKey**
Expand All @@ -77,18 +81,19 @@ After configuring Jira integration, you can synchronize project tasks to Jira fo
```

Where:

- `{jira_endpoint}`: Jira URL, e.g., https://www.atlassian.com/
- `{projectKey}`: Jira project Key

2. After getting all issue type information, use ctrl + f shortcut to quickly find the id corresponding to the issue type you need to configure, e.g., find the id value for `issuetype` `Bug`

![jira_2](./img/jira_2.png)
![jira_2](./img/jira_2.png)

3. After finding the id corresponding to the issue type, configure it in the `issueType` field.
```yaml
issueType: '10004' # Jira issue type
```

```yaml
issueType: '10004' # Jira issue type
```

- **issueTitleTemplate**

Expand All @@ -109,52 +114,57 @@ After configuring Jira integration, you can synchronize project tasks to Jira fo
```

Where:

- `{jira_endpoint}`: Jira URL, e.g., https://www.atlassian.com/
- `{projectKey}`: Jira project Key

2. After getting all field information, use ctrl + f shortcut to quickly find the custom field name you need to configure, e.g., find the name and value of field `test1-type`

![jira_3](./img/jira_3.png)
![jira_3](./img/jira_3.png)

3. Enter the corresponding field format according to the [Jira Official Documentation](https://developer.atlassian.com/server/jira/platform/rest/v10000/intro/#field-input-formats), enter the field name and value in the Jira configuration. Taking the multi-select box `test1-type` as an example:

- Find "Multi-select Type" in the Jira official documentation, copy the format

![jira_4](./img/jira_4.png)

- Under custom fields in the Jira configuration, paste the "Multi-select Type" format, replace the content with the previously found `test1-type` field name and value

```yaml
customFields:
"customfield_10187" : [ { "value": "n1" }, { "value": "n2" } ]
```
```yaml
customFields:
'customfield_10187': [{ 'value': 'n1' }, { 'value': 'n2' }]
```

### Variable Description

Task information in integration supports using variables, see the table below:

| Variable Name | Meaning |
|--------|------|
| `{{task.title}}` | Task name |
| `{{record.title}}` | Record name |
| Variable Name | Meaning |
| ------------------------ | ------------------ |
| `{{task.title}}` | Task name |
| `{{record.title}}` | Record name |
| `{{record.description}}` | Record description |
| `{{record.labels}}` | Record labels |
| `{{record.link}}` | Record link |
| `{{device.id}}` | Device ID |
| `{{device.title}}` | Device name |
| `{{record.labels}}` | Record labels |
| `{{record.link}}` | Record link |
| `{{device.id}}` | Device ID |
| `{{device.title}}` | Device name |

### Synchronize Tasks to Jira

> After Jira integration configuration is complete, general tasks in the project can be synchronized to Jira. Learn about [General Tasks](../project-collaboration/2-general-task.md)

1. Enter the project's "General Tasks" page, click the [Sync Task] button corresponding to the task

![jira_5](./img/jira_5.png)
![jira_5](./img/jira_5.png)

2. After successful synchronization, the created Jira link and status will be displayed. Click the status button to jump to Jira to view issue details.

## Managing Jira Integration

> Only project administrators can manage Jira integration

### Edit Integration

1. In the project, go to "Project Settings - Service Integration" page, click [Edit Config] for Jira.

![jira_6](./img/jira_6.png)
Expand All @@ -164,10 +174,11 @@ Task information in integration supports using variables, see the table below:
![jira_7](./img/jira_7.png)

### Delete Integration

1. In the project, go to "Project Settings - Service Integration" page, click [Edit Config] for Jira.

![jira_6](./img/jira_6.png)

2. Click [Delete], confirm again to delete the integration information. After deletion, tasks cannot be synchronized to Jira.

![jira_8](./img/jira_8.png)
![jira_8](./img/jira_8.png)
Loading