diff --git a/README.md b/README.md index b94073679..fa837cb4a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# Announcement +# :warning: Announcement: PLEASE READ :warning: Focalboard Personal Server and Personal Desktop editions will transition to being fully community supported as of **April 30th, 2023**. This Focalboard repository will become the Personal Edition repository, and will remain open indefinitely. However, we won’t be adding any new enhancements, and will only address Sev-1 level bugs until April 30th, 2023. -The Boards plugin version will be integrated into Mattermost as a core in-product feature, and will no longer be supported as a plugin as of release v7.11 (May 2023). The plugin code will be merged into the [Mattermost-server repository](https://github.com/mattermost/mattermost-server) where future enhancements will be added to moving forward. +The Boards plugin version will be integrated into Mattermost as a core in-product feature, and will no longer be supported as a plugin as of release v7.11 (May 2023). The plugin code will be merged into the [Mattermost-server repository](https://github.com/mattermost/mattermost-server) where future enhancements will be added to moving forward. New pull requests and issues should be filed against https://github.com/mattermost/mattermost-server. Please see [this dicussion](https://github.com/mattermost/focalboard/discussions/4645) for more details. diff --git a/server/services/store/sqlstore/schema_table_migration.go b/server/services/store/sqlstore/schema_table_migration.go index 2ab075658..1347fd986 100644 --- a/server/services/store/sqlstore/schema_table_migration.go +++ b/server/services/store/sqlstore/schema_table_migration.go @@ -123,6 +123,13 @@ func (s *SQLStore) isSchemaMigrationNeeded() (bool, error) { "TABLE_NAME": s.tablePrefix + "schema_migrations", }) + switch s.dbType { + case model.MysqlDBType: + query = query.Where(sq.Eq{"TABLE_SCHEMA": s.schemaName}) + case model.PostgresDBType: + query = query.Where("table_schema = current_schema()") + } + rows, err := query.Query() if err != nil { s.logger.Error("failed to fetch columns in schema_migrations table", mlog.Err(err)) diff --git a/webapp/src/components/kanban/kanban.tsx b/webapp/src/components/kanban/kanban.tsx index 190895fcf..d341f39bc 100644 --- a/webapp/src/components/kanban/kanban.tsx +++ b/webapp/src/components/kanban/kanban.tsx @@ -203,7 +203,7 @@ const Kanban = (props: Props) => { await Promise.all(awaits) await mutator.changeViewCardOrder(props.board.id, activeView.id, activeView.fields.cardOrder, cardOrder, description) }) - }, [cards.map((o) => o.id).join(','), activeView.id, activeView.fields.cardOrder, groupByProperty, props.selectedCardIds]) + }, [cards, activeView.id, activeView.fields.cardOrder, groupByProperty, props.selectedCardIds]) const [showCalculationsMenu, setShowCalculationsMenu] = useState>(new Map()) const toggleOptions = (templateId: string, show: boolean) => { diff --git a/webapp/src/hooks/permissions.tsx b/webapp/src/hooks/permissions.tsx index a050d45e5..b8d1d0804 100644 --- a/webapp/src/hooks/permissions.tsx +++ b/webapp/src/hooks/permissions.tsx @@ -4,7 +4,6 @@ import {useAppSelector} from '../store/hooks' import {getMyBoardMembership, getCurrentBoardId, getBoard} from '../store/boards' import {getCurrentTeam} from '../store/teams' -import {Utils} from '../utils' import {Permission} from '../constants' import {MemberRole} from '../blocks/board' @@ -24,10 +23,6 @@ export const useHasPermissions = (teamId: string, boardId: string, permissions: return false } - if (!Utils.isFocalboardPlugin()) { - return true - } - const adminPermissions = [Permission.ManageBoardType, Permission.DeleteBoard, Permission.ShareBoard, Permission.ManageBoardRoles, Permission.DeleteOthersComments] const editorPermissions = [Permission.ManageBoardCards, Permission.ManageBoardProperties] const commenterPermissions = [Permission.CommentBoardCards] diff --git a/webapp/src/wsclient.ts b/webapp/src/wsclient.ts index e88ab2043..893e68d55 100644 --- a/webapp/src/wsclient.ts +++ b/webapp/src/wsclient.ts @@ -127,6 +127,8 @@ class WSClient { onUnfollowBlock: FollowChangeHandler = () => {} private notificationDelay = 100 private reopenDelay = 3000 + private reopenRetryCount = 0 + private reopenMaxRetries = 10 private updatedData: UpdatedData = {Blocks: [], Categories: [], BoardCategories: [], Boards: [], BoardMembers: [], CategoryOrder: []} private updateTimeout?: NodeJS.Timeout private errorPollId?: NodeJS.Timeout @@ -400,6 +402,7 @@ class WSClient { ws.onopen = () => { Utils.log('WSClient webSocket opened.') this.state = 'open' + this.reopenRetryCount = 0 // if has a token defined when connecting, authenticate if (this.token) { @@ -426,19 +429,25 @@ class WSClient { Utils.log(`WSClient websocket onclose, code: ${e.code}, reason: ${e.reason}`) if (ws === this.ws) { // Unexpected close, re-open - Utils.logError('Unexpected close, re-opening websocket') + Utils.logError('Unexpected WSClient close') for (const handler of this.onStateChange) { handler(this, 'close') } this.state = 'close' - setTimeout(() => { - // ToDo: assert that this actually runs the onopen - // contents (auth + this.subscribe()) - this.open() - for (const handler of this.onReconnect) { - handler(this) - } - }, this.reopenDelay) + + if (this.reopenRetryCount < this.reopenMaxRetries) { + setTimeout(() => { + this.reopenRetryCount++ + Utils.log(`Reopening websocket connection, count: ${this.reopenRetryCount}`) + + this.open() + for (const handler of this.onReconnect) { + handler(this) + } + }, this.reopenDelay) + } else { + Utils.logError('Reached max websocket re-opening attempts') + } } }