Исправлены ошибки в 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.fromIssuesIncluded,
|
||||||
widgetParams.groups.showOthers,
|
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 stories.map((s) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,12 @@ export class TreeIssuesStore {
|
||||||
store: othersStore,
|
store: othersStore,
|
||||||
metainfo: this.createMetaInfo(this.rootIssue),
|
metainfo: this.createMetaInfo(this.rootIssue),
|
||||||
});
|
});
|
||||||
|
this.putIssuesToStore(
|
||||||
|
othersStore,
|
||||||
|
this.rootIssue,
|
||||||
|
fromIssues,
|
||||||
|
fromIssuesIncluded,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
@ -107,6 +113,7 @@ export class TreeIssuesStore {
|
||||||
const issueData = this.flatStore.getIssue(childIssue.id);
|
const issueData = this.flatStore.getIssue(childIssue.id);
|
||||||
if (!issueData.data) continue;
|
if (!issueData.data) continue;
|
||||||
if (fromIssues.indexOf(issueData.data.id) < 0) {
|
if (fromIssues.indexOf(issueData.data.id) < 0) {
|
||||||
|
store.push(issueData.data);
|
||||||
this.putIssuesToStore(
|
this.putIssuesToStore(
|
||||||
store,
|
store,
|
||||||
issueData.data,
|
issueData.data,
|
||||||
|
|
@ -157,16 +164,14 @@ export class TreeIssuesStore {
|
||||||
stories: TreeIssuesStoreNs.Models.GetFlatStories.Result,
|
stories: TreeIssuesStoreNs.Models.GetFlatStories.Result,
|
||||||
rootIssue: RedmineTypes.Issue,
|
rootIssue: RedmineTypes.Issue,
|
||||||
): TreeIssuesStoreNs.Models.GetFlatStories.Result {
|
): TreeIssuesStoreNs.Models.GetFlatStories.Result {
|
||||||
if (!stories) {
|
|
||||||
stories = [] as TreeIssuesStoreNs.Models.GetFlatStories.Result;
|
|
||||||
}
|
|
||||||
if (!rootIssue) {
|
|
||||||
rootIssue = this.rootIssue;
|
|
||||||
}
|
|
||||||
if (!rootIssue.children || rootIssue.children.length <= 0) {
|
if (!rootIssue.children || rootIssue.children.length <= 0) {
|
||||||
return stories;
|
return stories;
|
||||||
}
|
}
|
||||||
const store = new FlatIssuesStore();
|
const store = new FlatIssuesStore();
|
||||||
|
stories.push({
|
||||||
|
store: store,
|
||||||
|
metainfo: this.createMetaInfo(rootIssue),
|
||||||
|
});
|
||||||
for (let i = 0; i < rootIssue.children.length; i++) {
|
for (let i = 0; i < rootIssue.children.length; i++) {
|
||||||
const child = rootIssue.children[i];
|
const child = rootIssue.children[i];
|
||||||
const childIssueData = this.flatStore.getIssue(child.id);
|
const childIssueData = this.flatStore.getIssue(child.id);
|
||||||
|
|
@ -174,10 +179,6 @@ export class TreeIssuesStore {
|
||||||
store.push(childIssueData.data);
|
store.push(childIssueData.data);
|
||||||
this.fillFlatStoriesByParents(stories, childIssueData.data);
|
this.fillFlatStoriesByParents(stories, childIssueData.data);
|
||||||
}
|
}
|
||||||
stories.push({
|
|
||||||
store: store,
|
|
||||||
metainfo: this.createMetaInfo(rootIssue),
|
|
||||||
});
|
|
||||||
return stories;
|
return stories;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue