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
Show time description only when offset differs
Oliver Günther48c1156ff073
diff --git a/frontend/src/app/core/days/weekday.service.ts b/frontend/src/app/core/days/weekday.service.tsindex b3dce36a1a6..4ff8a5b8da7 100644--- a/frontend/src/app/core/days/weekday.service.ts+++ b/frontend/src/app/core/days/weekday.service.ts@@ -42,7 +42,7 @@ import {Observable,of,} from 'rxjs';-import {Moment} from 'moment';+import { Moment } from 'moment';@Injectable({ providedIn: 'root' })export class WeekdayService {diff --git a/frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.ts b/frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.tsindex 24a6d9b6bcf..a2fb2a21a50 100644--- a/frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.ts+++ b/frontend/src/app/features/work-packages/components/wp-baseline/baseline-legends/baseline-legends.component.ts@@ -124,13 +124,13 @@ export class OpBaselineLegendsComponent extends UntilDestroyedMixin implements Opublic getFilterName(timestamps:string[]) {const datesAndTimes = timestamps.map((el) => el.split(/[@T]/));- const filter = baselineFilterFromValue(this.wpTableBaseline.current);+ const baselineValue = baselineFilterFromValue(this.wpTableBaseline.current);const changesSince = this.I18n.t('js.baseline.legends.changes_since');let description = '';let upstreamDate = '';let localDate = '';- switch (filter) {+ switch (baselineValue) {case 'oneDayAgo':[upstreamDate, localDate] = this.deriveSingleDate(this.wpTableBaseline.yesterdayDate(), datesAndTimes[0][1]);description = this.I18n.t('js.baseline.drop_down.yesterday');diff --git a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.htmlindex 5ebdb600351..590e8d3e1dc 100644--- a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html+++ b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html@@ -126,7 +126,9 @@</spot-tooltip>- <span slot="description" [textContent]="text.time_description(0)"></span>+ <span+ *ngIf="userOffset !== selectedOffsets[0]"+ slot="description" [textContent]="text.time_description(0)"></span></spot-form-field><spot-form-field@@ -151,7 +153,9 @@</spot-tooltip>- <span slot="description" [textContent]="text.time_description(1)"></span>+ <span+ *ngIf="userOffset !== selectedOffsets[1]"+ slot="description" [textContent]="text.time_description(1)"></span></spot-form-field></div>diff --git a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.ts b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.tsindex 08253233a0c..18d8b361c5e 100644--- a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.ts+++ b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.ts@@ -173,7 +173,7 @@ export class OpBaselineComponent extends UntilDestroyedMixin implements OnInit {this.wpTableBaseline.current.forEach((value, i) => {const parts = getPartsFromTimestamp(value);if (parts) {- this.selectedDates[i] = !!this.selectedDates[i] ? this.selectedDates[i] : parts.date;+ this.selectedDates[i] = this.selectedDates[i] ? this.selectedDates[i] : parts.date;this.selectedTimes[i] = parts.time;this.selectedOffsets[i] = parts.offset;}@@ -261,6 +261,6 @@ export class OpBaselineComponent extends UntilDestroyedMixin implements OnInit {private buildFilterString(i:number):string {const timeWithOffset = `${this.selectedTimes[i]}${this.selectedOffsets[i]}`;- return `${this.selectedFilter}@${timeWithOffset}`;+ return `${this.selectedFilter as string}@${timeWithOffset}`;}}diff --git a/spec/support/components/work_packages/baseline_modal.rb b/spec/support/components/work_packages/baseline_modal.rbindex c5b35f82028..5c065d72186 100644--- a/spec/support/components/work_packages/baseline_modal.rb+++ b/spec/support/components/work_packages/baseline_modal.rb@@ -92,7 +92,7 @@ module Componentsset_time to_time, 'op-baseline-to-time'end- def expect_between_dates(from:,from_time:, to:, to_time:)+ def expect_between_dates(from:, from_time:, to:, to_time:)expect(page).to have_field('op-baseline-from-time', with: from_time)expect(page).to have_field('op-baseline-to-time', with: to_time)