Preserve per-project archive history when restoring items
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
+2
-1
@@ -962,6 +962,7 @@ function App() {
|
|||||||
const entries = [], history = [];
|
const entries = [], history = [];
|
||||||
projs.forEach((p, i) => {
|
projs.forEach((p, i) => {
|
||||||
for (const e of parsedAll[i].entries) e._projectId = p.id;
|
for (const e of parsedAll[i].entries) e._projectId = p.id;
|
||||||
|
for (const h of parsedAll[i].history) h._projectId = p.id;
|
||||||
entries.push(...parsedAll[i].entries);
|
entries.push(...parsedAll[i].entries);
|
||||||
history.push(...parsedAll[i].history);
|
history.push(...parsedAll[i].history);
|
||||||
});
|
});
|
||||||
@@ -1139,7 +1140,7 @@ function App() {
|
|||||||
));
|
));
|
||||||
const archiveContent = await Parser.serialize(toDiskIds(
|
const archiveContent = await Parser.serialize(toDiskIds(
|
||||||
remainingArchive.filter(e => pidOf(e) === pid),
|
remainingArchive.filter(e => pidOf(e) === pid),
|
||||||
[],
|
archiveData.history.filter(h => pidOf(h) === pid),
|
||||||
pid,
|
pid,
|
||||||
));
|
));
|
||||||
const result = await ApiBackend.restoreFromArchive(backlogContent, archiveContent, pid);
|
const result = await ApiBackend.restoreFromArchive(backlogContent, archiveContent, pid);
|
||||||
|
|||||||
Reference in New Issue
Block a user