feat: implement project ignore list for Jira synchronization
- Updated `JiraConfigForm` to include an input for ignored projects, allowing users to specify projects to exclude from synchronization. - Enhanced `JiraService` with a method to filter out tasks from ignored projects, improving task management. - Modified user preferences to store ignored projects, ensuring persistence across sessions. - Updated API routes to handle ignored projects in configuration, enhancing overall functionality. - Marked the corresponding task as complete in TODO.md.
This commit is contained in:
@@ -26,7 +26,7 @@ export async function GET() {
|
||||
export async function PUT(request: NextRequest) {
|
||||
try {
|
||||
const body = await request.json();
|
||||
const { baseUrl, email, apiToken } = body;
|
||||
const { baseUrl, email, apiToken, ignoredProjects } = body;
|
||||
|
||||
// Validation des données requises
|
||||
if (!baseUrl || !email || !apiToken) {
|
||||
@@ -59,7 +59,10 @@ export async function PUT(request: NextRequest) {
|
||||
baseUrl: baseUrl.trim(),
|
||||
email: email.trim(),
|
||||
apiToken: apiToken.trim(),
|
||||
enabled: true
|
||||
enabled: true,
|
||||
ignoredProjects: Array.isArray(ignoredProjects)
|
||||
? ignoredProjects.map((p: string) => p.trim().toUpperCase()).filter((p: string) => p.length > 0)
|
||||
: []
|
||||
};
|
||||
|
||||
await userPreferencesService.saveJiraConfig(jiraConfig);
|
||||
@@ -91,7 +94,8 @@ export async function DELETE() {
|
||||
baseUrl: '',
|
||||
email: '',
|
||||
apiToken: '',
|
||||
enabled: false
|
||||
enabled: false,
|
||||
ignoredProjects: []
|
||||
};
|
||||
|
||||
await userPreferencesService.saveJiraConfig(defaultConfig);
|
||||
|
||||
Reference in New Issue
Block a user