Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WEB-1015] fix: kanban layout cycle and module quick add #4252

Merged
Merged
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
4 changes: 4 additions & 0 deletions web/store/issue/cycle/issue.store.ts
Original file line number Diff line number Diff line change
@@ -269,6 +269,10 @@ export class CycleIssues extends IssueHelperStore implements ICycleIssues {
});

const response = await this.createIssue(workspaceSlug, projectId, data, cycleId);

if (data.module_ids && data.module_ids.length > 0)
await this.rootStore.moduleIssues.addModulesToIssue(workspaceSlug, projectId, response.id, data.module_ids);

this.rootIssueStore.rootStore.cycle.fetchCycleDetails(workspaceSlug, projectId, cycleId);

const quickAddIssueIndex = this.issues[cycleId].findIndex((_issueId) => _issueId === data.id);
4 changes: 4 additions & 0 deletions web/store/issue/module/issue.store.ts
Original file line number Diff line number Diff line change
@@ -274,6 +274,10 @@ export class ModuleIssues extends IssueHelperStore implements IModuleIssues {
});

const response = await this.createIssue(workspaceSlug, projectId, data, moduleId);

if (data.cycle_id && data.cycle_id !== "")
await this.rootStore.cycleIssues.addIssueToCycle(workspaceSlug, projectId, data.cycle_id, [response.id]);

this.rootIssueStore.rootStore.module.fetchModuleDetails(workspaceSlug, projectId, moduleId);

const quickAddIssueIndex = this.issues[moduleId].findIndex((_issueId) => _issueId === data.id);
6 changes: 6 additions & 0 deletions web/store/issue/project-views/issue.store.ts
Original file line number Diff line number Diff line change
@@ -239,6 +239,12 @@ export class ProjectViewIssues extends IssueHelperStore implements IProjectViewI

const response = await this.createIssue(workspaceSlug, projectId, data, viewId);

if (data.cycle_id && data.cycle_id !== "")
await this.rootStore.cycleIssues.addIssueToCycle(workspaceSlug, projectId, data.cycle_id, [response.id]);

if (data.module_ids && data.module_ids.length > 0)
await this.rootStore.moduleIssues.addModulesToIssue(workspaceSlug, projectId, response.id, data.module_ids);

const quickAddIssueIndex = this.issues[viewId].findIndex((_issueId) => _issueId === data.id);
if (quickAddIssueIndex >= 0)
runInAction(() => {
6 changes: 6 additions & 0 deletions web/store/issue/project/issue.store.ts
Original file line number Diff line number Diff line change
@@ -223,6 +223,12 @@ export class ProjectIssues extends IssueHelperStore implements IProjectIssues {

const response = await this.createIssue(workspaceSlug, projectId, data);

if (data.cycle_id && data.cycle_id !== "")
anmolsinghbhatia marked this conversation as resolved.
Show resolved Hide resolved
await this.rootStore.cycleIssues.addIssueToCycle(workspaceSlug, projectId, data.cycle_id, [response.id]);

if (data.module_ids && data.module_ids.length > 0)
await this.rootStore.moduleIssues.addModulesToIssue(workspaceSlug, projectId, response.id, data.module_ids);

const quickAddIssueIndex = this.issues[projectId].findIndex((_issueId) => _issueId === data.id);
if (quickAddIssueIndex >= 0)
runInAction(() => {