Ajoute projet et migration milestone
Signed-off-by: Gato <cedric@goutailler-olivier.fr>
This commit is contained in:
@@ -70,12 +70,12 @@ export class IssuesStore {
|
||||
const normalized = this.normalizeIssue(issue);
|
||||
if (!normalized.id) {
|
||||
const { id: _id, ...body } = normalized;
|
||||
const created = this.normalizeIssue(await firstValueFrom(this.api.create(body)));
|
||||
const created = this.normalizeIssue(await firstValueFrom(this.api.create(this.currentProjectId!, body)));
|
||||
this.data.update((issues) => [...issues, created]);
|
||||
this.recalculateCalculatedIssues();
|
||||
return created;
|
||||
} else {
|
||||
const apiResult = await firstValueFrom(this.api.update(normalized.id, normalized));
|
||||
const apiResult = await firstValueFrom(this.api.update(this.currentProjectId!, normalized.id, normalized));
|
||||
// L'API ne retourne pas linkedIssueIds dans les commentaires : on le restaure
|
||||
// depuis les données envoyées pour ne pas perdre les liens.
|
||||
if (Array.isArray(apiResult.comments) && Array.isArray(normalized.comments)) {
|
||||
@@ -103,7 +103,7 @@ export class IssuesStore {
|
||||
}
|
||||
|
||||
async deleteById(id: number): Promise<void> {
|
||||
await firstValueFrom(this.api.remove(id));
|
||||
await firstValueFrom(this.api.remove(this.currentProjectId!, id));
|
||||
this.data.update((issues) =>
|
||||
issues
|
||||
.filter((i) => i.id !== id)
|
||||
|
||||
Reference in New Issue
Block a user