Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
fix: respect last value for remianing efforts for magic links
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanH90 committed Mar 7, 2024
1 parent 1aeede4 commit 14a0336
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/index/reports/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ export default class IndexReportsRoute extends Route {

if (controller.task) {
try {
const task = await this.store.findRecord("task", controller.task);

await this.store.createRecord("report", {
task: await this.store.findRecord("task", controller.task),
task,
duration: controller.duration
? moment.duration(controller.duration)
: "",
Expand All @@ -37,6 +39,7 @@ export default class IndexReportsRoute extends Route {
user: this.modelFor("protected"),
review: controller.review ?? false,
notBillable: controller.notBillable ?? false,
remainingEffort: task.mostRecentRemainingEffort,
});

controller.task = null;
Expand Down

0 comments on commit 14a0336

Please sign in to comment.