mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: add Jira connector (#11285)
### What problem does this PR solve? Add Jira connector. <img width="978" height="925" alt="image" src="https://github.com/user-attachments/assets/78bb5c77-2710-4569-a76e-9087ca23b227" /> --- <img width="1903" height="489" alt="image" src="https://github.com/user-attachments/assets/193bc5c5-f751-4bd5-883a-2173282c2b96" /> --- <img width="1035" height="925" alt="image" src="https://github.com/user-attachments/assets/1a0aec19-30eb-4ada-9283-61d1c915f59d" /> --- <img width="1905" height="601" alt="image" src="https://github.com/user-attachments/assets/3dde1062-3f27-4717-8e09-fd5fd5e64171" /> ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -9,8 +9,8 @@ export enum DataSourceKey {
|
||||
NOTION = 'notion',
|
||||
DISCORD = 'discord',
|
||||
GOOGLE_DRIVE = 'google_drive',
|
||||
// GMAIL = 'gmail',
|
||||
// JIRA = 'jira',
|
||||
// GMAIL = 'gmail',
|
||||
JIRA = 'jira',
|
||||
// SHAREPOINT = 'sharepoint',
|
||||
// SLACK = 'slack',
|
||||
// TEAMS = 'teams',
|
||||
@ -42,6 +42,11 @@ export const DataSourceInfo = {
|
||||
description: t(`setting.${DataSourceKey.GOOGLE_DRIVE}Description`),
|
||||
icon: <SvgIcon name={'data-source/google-drive'} width={38} />,
|
||||
},
|
||||
[DataSourceKey.JIRA]: {
|
||||
name: 'Jira',
|
||||
description: t(`setting.${DataSourceKey.JIRA}Description`),
|
||||
icon: <SvgIcon name={'data-source/jira'} width={38} />,
|
||||
},
|
||||
};
|
||||
|
||||
export const DataSourceFormBaseFields = [
|
||||
@ -270,6 +275,106 @@ export const DataSourceFormFields = {
|
||||
defaultValue: 'uploaded',
|
||||
},
|
||||
],
|
||||
[DataSourceKey.JIRA]: [
|
||||
{
|
||||
label: 'Jira Base URL',
|
||||
name: 'config.base_url',
|
||||
type: FormFieldType.Text,
|
||||
required: true,
|
||||
placeholder: 'https://your-domain.atlassian.net',
|
||||
tooltip: t('setting.jiraBaseUrlTip'),
|
||||
},
|
||||
{
|
||||
label: 'Project Key',
|
||||
name: 'config.project_key',
|
||||
type: FormFieldType.Text,
|
||||
required: false,
|
||||
placeholder: 'RAGFlow',
|
||||
tooltip: t('setting.jiraProjectKeyTip'),
|
||||
},
|
||||
{
|
||||
label: 'Custom JQL',
|
||||
name: 'config.jql_query',
|
||||
type: FormFieldType.Textarea,
|
||||
required: false,
|
||||
placeholder: 'project = RAG AND updated >= -7d',
|
||||
tooltip: t('setting.jiraJqlTip'),
|
||||
},
|
||||
{
|
||||
label: 'Batch Size',
|
||||
name: 'config.batch_size',
|
||||
type: FormFieldType.Number,
|
||||
required: false,
|
||||
tooltip: t('setting.jiraBatchSizeTip'),
|
||||
},
|
||||
{
|
||||
label: 'Include Comments',
|
||||
name: 'config.include_comments',
|
||||
type: FormFieldType.Checkbox,
|
||||
required: false,
|
||||
defaultValue: true,
|
||||
tooltip: t('setting.jiraCommentsTip'),
|
||||
},
|
||||
{
|
||||
label: 'Include Attachments',
|
||||
name: 'config.include_attachments',
|
||||
type: FormFieldType.Checkbox,
|
||||
required: false,
|
||||
defaultValue: false,
|
||||
tooltip: t('setting.jiraAttachmentsTip'),
|
||||
},
|
||||
{
|
||||
label: 'Attachment Size Limit (bytes)',
|
||||
name: 'config.attachment_size_limit',
|
||||
type: FormFieldType.Number,
|
||||
required: false,
|
||||
defaultValue: 10 * 1024 * 1024,
|
||||
tooltip: t('setting.jiraAttachmentSizeTip'),
|
||||
},
|
||||
{
|
||||
label: 'Labels to Skip',
|
||||
name: 'config.labels_to_skip',
|
||||
type: FormFieldType.Tag,
|
||||
required: false,
|
||||
tooltip: t('setting.jiraLabelsTip'),
|
||||
},
|
||||
{
|
||||
label: 'Comment Email Blacklist',
|
||||
name: 'config.comment_email_blacklist',
|
||||
type: FormFieldType.Tag,
|
||||
required: false,
|
||||
tooltip: t('setting.jiraBlacklistTip'),
|
||||
},
|
||||
{
|
||||
label: 'Use Scoped Token (Clould only)',
|
||||
name: 'config.scoped_token',
|
||||
type: FormFieldType.Checkbox,
|
||||
required: false,
|
||||
tooltip: t('setting.jiraScopedTokenTip'),
|
||||
},
|
||||
{
|
||||
label: 'Jira User Email (Cloud) or User Name (Server)',
|
||||
name: 'config.credentials.jira_user_email',
|
||||
type: FormFieldType.Text,
|
||||
required: true,
|
||||
placeholder: 'you@example.com',
|
||||
tooltip: t('setting.jiraEmailTip'),
|
||||
},
|
||||
{
|
||||
label: 'Jira API Token (Cloud only)',
|
||||
name: 'config.credentials.jira_api_token',
|
||||
type: FormFieldType.Password,
|
||||
required: false,
|
||||
tooltip: t('setting.jiraTokenTip'),
|
||||
},
|
||||
{
|
||||
label: 'Jira Password (Server only)',
|
||||
name: 'config.credentials.jira_password',
|
||||
type: FormFieldType.Password,
|
||||
required: false,
|
||||
tooltip: t('setting.jiraPasswordTip'),
|
||||
},
|
||||
],
|
||||
// [DataSourceKey.GOOGLE_DRIVE]: [
|
||||
// {
|
||||
// label: 'Primary Admin Email',
|
||||
@ -433,4 +538,25 @@ export const DataSourceFormDefaultValues = {
|
||||
},
|
||||
},
|
||||
},
|
||||
[DataSourceKey.JIRA]: {
|
||||
name: '',
|
||||
source: DataSourceKey.JIRA,
|
||||
config: {
|
||||
base_url: '',
|
||||
project_key: '',
|
||||
jql_query: '',
|
||||
batch_size: 2,
|
||||
include_comments: true,
|
||||
include_attachments: false,
|
||||
attachment_size_limit: 10 * 1024 * 1024,
|
||||
labels_to_skip: [],
|
||||
comment_email_blacklist: [],
|
||||
scoped_token: false,
|
||||
credentials: {
|
||||
jira_user_email: '',
|
||||
jira_api_token: '',
|
||||
jira_password: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@ -44,6 +44,12 @@ const dataSourceTemplates = [
|
||||
description: DataSourceInfo[DataSourceKey.NOTION].description,
|
||||
icon: DataSourceInfo[DataSourceKey.NOTION].icon,
|
||||
},
|
||||
{
|
||||
id: DataSourceKey.JIRA,
|
||||
name: DataSourceInfo[DataSourceKey.JIRA].name,
|
||||
description: DataSourceInfo[DataSourceKey.JIRA].description,
|
||||
icon: DataSourceInfo[DataSourceKey.JIRA].icon,
|
||||
},
|
||||
];
|
||||
const DataSource = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
Reference in New Issue
Block a user