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

fix: respect last value for remaining efforts for magic links #1183

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading