Исправлены ошибки в tree-issue-store
This commit is contained in:
parent
85f4483845
commit
c3ad1df1b6
2 changed files with 20 additions and 10 deletions
|
|
@ -59,6 +59,15 @@ export class RootIssueSubTreesWidgetService
|
|||
widgetParams.groups.fromIssuesIncluded,
|
||||
widgetParams.groups.showOthers,
|
||||
);
|
||||
for (let i = 0; i < stories.length; i++) {
|
||||
const store = stories[i];
|
||||
const fromIssueInfo = widgetParams.groups.fromIssues.find((i) => {
|
||||
return i.issueId == store.metainfo?.rootIssue?.id;
|
||||
});
|
||||
if (fromIssueInfo) {
|
||||
store.metainfo.title = `${fromIssueInfo.name}: ${store.metainfo.title}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
return stories.map((s) => {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -85,6 +85,12 @@ export class TreeIssuesStore {
|
|||
store: othersStore,
|
||||
metainfo: this.createMetaInfo(this.rootIssue),
|
||||
});
|
||||
this.putIssuesToStore(
|
||||
othersStore,
|
||||
this.rootIssue,
|
||||
fromIssues,
|
||||
fromIssuesIncluded,
|
||||
);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
@ -107,6 +113,7 @@ export class TreeIssuesStore {
|
|||
const issueData = this.flatStore.getIssue(childIssue.id);
|
||||
if (!issueData.data) continue;
|
||||
if (fromIssues.indexOf(issueData.data.id) < 0) {
|
||||
store.push(issueData.data);
|
||||
this.putIssuesToStore(
|
||||
store,
|
||||
issueData.data,
|
||||
|
|
@ -157,16 +164,14 @@ export class TreeIssuesStore {
|
|||
stories: TreeIssuesStoreNs.Models.GetFlatStories.Result,
|
||||
rootIssue: RedmineTypes.Issue,
|
||||
): TreeIssuesStoreNs.Models.GetFlatStories.Result {
|
||||
if (!stories) {
|
||||
stories = [] as TreeIssuesStoreNs.Models.GetFlatStories.Result;
|
||||
}
|
||||
if (!rootIssue) {
|
||||
rootIssue = this.rootIssue;
|
||||
}
|
||||
if (!rootIssue.children || rootIssue.children.length <= 0) {
|
||||
return stories;
|
||||
}
|
||||
const store = new FlatIssuesStore();
|
||||
stories.push({
|
||||
store: store,
|
||||
metainfo: this.createMetaInfo(rootIssue),
|
||||
});
|
||||
for (let i = 0; i < rootIssue.children.length; i++) {
|
||||
const child = rootIssue.children[i];
|
||||
const childIssueData = this.flatStore.getIssue(child.id);
|
||||
|
|
@ -174,10 +179,6 @@ export class TreeIssuesStore {
|
|||
store.push(childIssueData.data);
|
||||
this.fillFlatStoriesByParents(stories, childIssueData.data);
|
||||
}
|
||||
stories.push({
|
||||
store: store,
|
||||
metainfo: this.createMetaInfo(rootIssue),
|
||||
});
|
||||
return stories;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue