OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Fix typo in ChronicDurationOptions key
Alexander Brandon Coles996f0b6cf437
diff --git a/frontend/src/app/shared/helpers/chronic_duration.spec.ts b/frontend/src/app/shared/helpers/chronic_duration.spec.tsindex b7c9fe3f01d..aa48fc6f64b 100644--- a/frontend/src/app/shared/helpers/chronic_duration.spec.ts+++ b/frontend/src/app/shared/helpers/chronic_duration.spec.ts@@ -161,9 +161,9 @@ describe('parseChronicDuration', () => {});});- describe('with .ignoreSecondsWhenColonSeperated param', () => {+ describe('with .ignoreSecondsWhenColonSeparated param', () => {it('parses 8:15 to 8 hours 15 minutes when seconds are ignored', () => {- expect(parseChronicDuration('8:15', { ignoreSecondsWhenColonSeperated: true })).toBe(8 * 3600 + 15 * 60);+ expect(parseChronicDuration('8:15', { ignoreSecondsWhenColonSeparated: true })).toBe(8 * 3600 + 15 * 60);});it('parses 8:15 to 8 minutes 15 seconds when seconds are not ignored', () => {diff --git a/frontend/src/app/shared/helpers/chronic_duration.ts b/frontend/src/app/shared/helpers/chronic_duration.tsindex e57aca0c645..b71934de252 100644--- a/frontend/src/app/shared/helpers/chronic_duration.ts+++ b/frontend/src/app/shared/helpers/chronic_duration.ts@@ -57,7 +57,7 @@ export interface ChronicDurationOptions {daysPerMonth?:number;defaultUnit?:DurationUnit;raiseExceptions?:boolean;- ignoreSecondsWhenColonSeperated?:boolean;+ ignoreSecondsWhenColonSeparated?:boolean;keepZero?:boolean;format?:DurationFormat;joiner?:string;@@ -187,7 +187,7 @@ function calculateFromWords(string:string, opts:ChronicDurationOptions):number {function filterByType(string:string, opts:ChronicDurationOptions):string {const chronoUnitsList = DURATION_UNITS_LIST.filter(function (value) {if (value === 'weeks') { return false; }- if (opts.ignoreSecondsWhenColonSeperated && value === 'seconds') { return false; }+ if (opts.ignoreSecondsWhenColonSeparated && value === 'seconds') { return false; }return true;});diff --git a/frontend/src/stimulus/helpers/chronic-duration-helper.ts b/frontend/src/stimulus/helpers/chronic-duration-helper.tsindex 148a002f5b5..281d671e491 100644--- a/frontend/src/stimulus/helpers/chronic-duration-helper.ts+++ b/frontend/src/stimulus/helpers/chronic-duration-helper.ts@@ -39,7 +39,7 @@ export function durationStringToSeconds(value:string):number {return parseChronicDuration(normalizedValue, {defaultUnit: 'hours',- ignoreSecondsWhenColonSeperated: true,+ ignoreSecondsWhenColonSeparated: true,}) || 0;}