Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dates inconsistencies in new advance task wizard and schedules #4079

Merged
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/gmp/commands/wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
event_data_quick_task_fields,
);

event_data['event_data:start_day'] = start_date.day();
event_data['event_data:start_day'] = start_date.date();

Check warning on line 181 in src/gmp/commands/wizard.js

View check run for this annotation

Codecov / codecov/patch

src/gmp/commands/wizard.js#L181

Added line #L181 was not covered by tests
event_data['event_data:start_month'] = start_date.month() + 1;
event_data['event_data:start_year'] = start_date.year();

Expand Down
4 changes: 2 additions & 2 deletions src/gmp/models/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import ical from 'ical.js';

import {v4 as uuid} from 'uuid';
Expand Down Expand Up @@ -305,7 +304,8 @@ class Event {
}

get duration() {
return createDuration({...this.event.duration});
const {weeks, ...durationWithoutWeeks} = this.event.duration;
return createDuration(durationWithoutWeeks);
}

get durationInSeconds() {
Expand Down
Loading