Исправлена функция обновления дерева
This commit is contained in:
parent
9568b12280
commit
82b63ef02e
2 changed files with 4 additions and 2 deletions
|
|
@ -199,13 +199,13 @@ export class TreeIssuesStore {
|
||||||
data: RedmineTypes.Issue[],
|
data: RedmineTypes.Issue[],
|
||||||
): RedmineTypes.Issue[] {
|
): RedmineTypes.Issue[] {
|
||||||
if (!issue || !issue.children || issue.children.length <= 0) return;
|
if (!issue || !issue.children || issue.children.length <= 0) return;
|
||||||
|
data.push(issue);
|
||||||
for (let i = 0; i < issue.children.length; i++) {
|
for (let i = 0; i < issue.children.length; i++) {
|
||||||
const childIssueResult = this.getFlatStore().getIssue(
|
const childIssueResult = this.getFlatStore().getIssue(
|
||||||
issue.children[i].id,
|
issue.children[i].id,
|
||||||
);
|
);
|
||||||
if (!childIssueResult || !childIssueResult.data) continue;
|
if (!childIssueResult || !childIssueResult.data) continue;
|
||||||
const childIssue = childIssueResult.data;
|
const childIssue = childIssueResult.data;
|
||||||
data.push(childIssue);
|
|
||||||
this.fillIssuesWithChildren(childIssue, data);
|
this.fillIssuesWithChildren(childIssue, data);
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,9 @@ export class SimpleKanbanBoardController {
|
||||||
cfg.rootIssueId,
|
cfg.rootIssueId,
|
||||||
);
|
);
|
||||||
const issues = await this.issuesService.getIssuesWithChildren(rootIssue);
|
const issues = await this.issuesService.getIssuesWithChildren(rootIssue);
|
||||||
this.logger.debug(`Issues for tree refresh - ${issues}`); // DEBUG
|
const issuesIds = issues.map((i) => i.id);
|
||||||
|
this.logger.debug(`Issues for tree refresh - ${issuesIds}`);
|
||||||
|
this.redmineEventsGateway.addIssues(issuesIds);
|
||||||
return { success: true };
|
return { success: true };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue