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
Merge branch 'release/15.0' into bug/58634-improve-error-handling-when-two-users-edit-the-same-work-package-in-parallel-(conflict)
Jonas Jabarifd348472aced
diff --cc app/components/work_packages/activities_tab/journals/item_component/details.html.erbindex 22abf93d2c9,f8b19b5d407..1398253b079--- a/app/components/work_packages/activities_tab/journals/item_component/details.html.erb+++ b/app/components/work_packages/activities_tab/journals/item_component/details.html.erb@@@ -4,10 -4,7 +4,11 @@@my: 0,border: :left,classes: "work-packages-activities-tab-journals-item-component-details--journal-details-container",- data: { initial: journal.initial? }+ data: {- "journal-with-changeset-updated-at": journal.updated_at.to_i, # used for the stimulus controller to maintain state- "journal-with-changeset-user-id": journal.user_id++ "journal-with-changeset-updated-at": journal.updated_at.to_i, # used by the stimulus controller to maintain state++ "journal-with-changeset-user-id": journal.user_id, # used by the stimulus controller to maintain state++ initial: journal.initial? # used by the stimulus controller to render correctly+ }) do |details_container|case filterwhen :only_commentsdiff --cc frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.tsindex 16b6f0e9b61,955d44d3d96..e681be3cc46--- a/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts+++ b/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts@@@ -64,15 -62,32 +64,16 @@@ export default class IndexController exthis.turboRequests = context.services.turboRequests;this.apiV3Service = context.services.apiV3Service;+ this.setLocalStorageKeys();+ this.handleStemVisibility();- this.setLocalStorageKey();this.setupEventListeners();this.handleInitialScroll();- this.startPolling();this.populateRescuedEditorContent();this.markAsConnected();+ this.safeUpdateWorkPackageFormsWithStateChecks(); // required if switching back to the activities tab from another tab- // Towards using updateDisplayedWorkPackageAttributes here:- //- // this ideally only is triggered when switched back to the activities tab from e.g. the "Files" tab- // in order to make sure that the state of the displayed work package attributes is aligned with the state of the refreshed journal entries- //- // this is necessary because the polling for updates (and related work package attribute updates) only happens when the activity tab is connected- //- // without any further checks, this update is currently triggered even after the very first rendering of the activity tab- //- // this is not ideal but I don't want to introduce another hacky "ui-state-check" for now- this.updateDisplayedWorkPackageAttributes();-- // something like below could be used to check for the ui state in the disconnect method- // in order to identify if the activity tab was connected at least once- // and then call updateDisplayedWorkPackageAttributes accordingly after an "implicit" tab change:- //- // const workPackageContainer = document.getElementsByTagName('wp-full-view-entry')[0] as HTMLElement;- // workPackageContainer.dataset.activityTabWasConnected = 'true';+ this.setLatestKnownChangesetUpdatedAt();+ this.startPolling();}disconnect() {@@@ -206,10 -198,8 +207,11 @@@}private handleUpdateStreamsResponse(html:string, headers:Headers, journalsContainerAtBottom:boolean) {+ // the timeout is require in order to give the Turb.renderStream method enough time to render the new journals+ // the methods below partially rely on the DOM to be updated+ // a specific signal would be way better than a static timeout, but I couldn't find a suitable onesetTimeout(() => {+ this.handleStemVisibility();this.setLastServerTimestampViaHeaders(headers);this.checkForAndHandleWorkPackageUpdate(html);this.checkForNewNotifications(html);