forked from github/plane
chore: module and cycle bug fixes (#3435)
* chore: project active cycle improvement * chore: cycle and module add existing mutation fix
This commit is contained in:
committed by
GitHub
parent
f3ae57bc85
commit
c6b756d918
@@ -182,13 +182,6 @@ export class CycleIssues extends IssueHelperStore implements ICycleIssues {
|
||||
const response = await this.rootIssueStore.projectIssues.createIssue(workspaceSlug, projectId, data);
|
||||
await this.addIssueToCycle(workspaceSlug, projectId, cycleId, [response.id]);
|
||||
|
||||
runInAction(() => {
|
||||
update(this.issues, cycleId, (cycleIssueIds) => {
|
||||
if (!cycleIssueIds) return [response.id];
|
||||
else return concat(cycleIssueIds, [response.id]);
|
||||
});
|
||||
});
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
@@ -272,8 +265,11 @@ export class CycleIssues extends IssueHelperStore implements ICycleIssues {
|
||||
issues: issueIds,
|
||||
});
|
||||
|
||||
issueIds.map((issueId) => {
|
||||
this.rootIssueStore.issues.updateIssue(issueId, { cycle_id: cycleId });
|
||||
runInAction(() => {
|
||||
update(this.issues, cycleId, (cycleIssueIds) => {
|
||||
if (!cycleIssueIds) return [...issueIds];
|
||||
else return concat(cycleIssueIds, [...issueIds]);
|
||||
});
|
||||
});
|
||||
|
||||
return issueToCycle;
|
||||
|
||||
Reference in New Issue
Block a user