Compare commits
10 Commits
test/justi
...
backport/3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a514e6e168 | ||
|
|
cb5553ea94 | ||
|
|
335ee31c7c | ||
|
|
9b4379727d | ||
|
|
a5fe2f59be | ||
|
|
1b58f7854e | ||
|
|
b6effa468f | ||
|
|
2b512b88c4 | ||
|
|
5cb61cba90 | ||
|
|
0657efe239 |
2
.github/workflows/integration.yml
vendored
2
.github/workflows/integration.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
matrix:
|
||||
php-versions: ['7.4']
|
||||
databases: ['sqlite', 'mysql', 'pgsql']
|
||||
server-versions: ['master']
|
||||
server-versions: ['stable24']
|
||||
|
||||
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
|
||||
|
||||
|
||||
2
.github/workflows/phpunit.yml
vendored
2
.github/workflows/phpunit.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
matrix:
|
||||
php-versions: ['7.4', '8.0', '8.1']
|
||||
databases: ['sqlite', 'mysql', 'pgsql']
|
||||
server-versions: ['master']
|
||||
server-versions: ['stable24']
|
||||
|
||||
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
|
||||
|
||||
|
||||
2
.github/workflows/static-analysis.yml
vendored
2
.github/workflows/static-analysis.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ocp-version: [ 'dev-master' ]
|
||||
ocp-version: [ 'dev-stable24' ]
|
||||
name: Nextcloud ${{ matrix.ocp-version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
99
lib/Migration/Version10800Date20220422061816.php
Normal file
99
lib/Migration/Version10800Date20220422061816.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2022 Your name <your@email.com>
|
||||
*
|
||||
* @author Your name <your@email.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Deck\Migration;
|
||||
|
||||
use Closure;
|
||||
use Doctrine\DBAL\Schema\SchemaException;
|
||||
use OCP\DB\ISchemaWrapper;
|
||||
use OCP\Migration\IOutput;
|
||||
use OCP\Migration\SimpleMigrationStep;
|
||||
|
||||
class Version10800Date20220422061816 extends SimpleMigrationStep {
|
||||
|
||||
/**
|
||||
* @param IOutput $output
|
||||
* @param Closure(): ISchemaWrapper $schemaClosure The `\Closure` returns a `ISchemaWrapper`
|
||||
* @param array $options
|
||||
* @return null|ISchemaWrapper
|
||||
* @throws SchemaException
|
||||
*/
|
||||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
|
||||
$schema = $schemaClosure();
|
||||
|
||||
$indexAdded = $this->addIndex($schema,
|
||||
'deck_boards',
|
||||
'idx_owner_modified',
|
||||
[ 'owner', 'last_modified' ]
|
||||
);
|
||||
|
||||
$indexAdded = $this->addIndex($schema,
|
||||
'deck_board_acl',
|
||||
'idx_participant_type',
|
||||
[ 'participant', 'type']
|
||||
) || $indexAdded;
|
||||
|
||||
$indexAdded = $this->addIndex($schema,
|
||||
'deck_cards',
|
||||
'idx_due_notified_archived_deleted', [
|
||||
'duedate', 'notified', 'archived', 'deleted_at'
|
||||
],
|
||||
) || $indexAdded;
|
||||
|
||||
$indexAdded = $this->addIndex($schema,
|
||||
'deck_cards',
|
||||
'idx_last_editor', [
|
||||
'last_editor', 'description_prev'
|
||||
], [],
|
||||
// Adding a partial index on the description_prev as it is only used for a NULL check
|
||||
['lengths' => [null, 1]]
|
||||
) || $indexAdded;
|
||||
|
||||
$indexAdded = $this->addIndex($schema,
|
||||
'deck_attachment',
|
||||
'idx_cardid_deletedat',
|
||||
[ 'card_id', 'deleted_at']
|
||||
) || $indexAdded;
|
||||
|
||||
$indexAdded = $this->addIndex($schema,
|
||||
'deck_assigned_users',
|
||||
'idx_card_participant',
|
||||
[ 'card_id', 'participant']
|
||||
) || $indexAdded;
|
||||
|
||||
return $indexAdded ? $schema : null;
|
||||
}
|
||||
|
||||
private function addIndex(ISchemaWrapper $schema, string $table, string $indexName, array $columns, array $flags = [], array $options = []): bool {
|
||||
$table = $schema->getTable($table);
|
||||
if (!$table->hasIndex($indexName)) {
|
||||
$table->addIndex($columns, $indexName, $flags, $options);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -181,6 +181,7 @@ class StackService {
|
||||
if (array_key_exists($card->id, $labels)) {
|
||||
$cards[$cardIndex]->setLabels($labels[$card->id]);
|
||||
}
|
||||
$cards[$cardIndex]->setAttachmentCount($this->attachmentService->count($card->getId()));
|
||||
}
|
||||
$stacks[$stackIndex]->setCards($cards);
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
v-if="cardDetailsInModal && $route.params.cardId"
|
||||
:clear-view-delay="0"
|
||||
:title="t('deck', 'Card details')"
|
||||
size="large"
|
||||
@close="hideModal()">
|
||||
<div class="modal__content modal__card">
|
||||
<router-view name="sidebar" />
|
||||
@@ -154,14 +155,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.modal__card {
|
||||
min-width: 320px;
|
||||
width: 50vw;
|
||||
max-width: 800px;
|
||||
min-height: 200px;
|
||||
height: 80vh;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@@ -225,6 +225,8 @@ export default {
|
||||
max-width: calc(100% - #{$modal-padding*2});
|
||||
padding: 0 14px;
|
||||
max-height: 100%;
|
||||
overflow: initial;
|
||||
|
||||
&::v-deep {
|
||||
.app-sidebar-header {
|
||||
position: sticky;
|
||||
@@ -240,6 +242,10 @@ export default {
|
||||
background-color: var(--color-main-background);
|
||||
}
|
||||
|
||||
.app-sidebar__tab {
|
||||
overflow: initial;
|
||||
}
|
||||
|
||||
#emptycontent, .emptycontent {
|
||||
margin-top: 88px;
|
||||
}
|
||||
|
||||
@@ -135,6 +135,10 @@ export default {
|
||||
},
|
||||
activeBoards() {
|
||||
return this.$store.getters.boards.filter((item) => item.deletedAt === 0 && item.archived === false)
|
||||
},
|
||||
|
||||
boardId() {
|
||||
return this.card?.boardId ? this.card.boardId : this.$route.params.id
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -167,10 +171,13 @@ export default {
|
||||
},
|
||||
})
|
||||
},
|
||||
moveCard() {
|
||||
async moveCard() {
|
||||
this.copiedCard = Object.assign({}, this.card)
|
||||
this.copiedCard.stackId = this.selectedStack.id
|
||||
this.$store.dispatch('moveCard', this.copiedCard)
|
||||
if (parseInt(this.boardId) === parseInt(this.selectedStack.boardId)) {
|
||||
await this.$store.commit('addNewCard', { ...this.copiedCard })
|
||||
}
|
||||
this.modalShow = false
|
||||
},
|
||||
async loadStacksFromBoard(board) {
|
||||
|
||||
@@ -264,6 +264,9 @@ export default {
|
||||
Vue.set(state.cards[existingIndex], 'attachmentCount', state.cards[existingIndex].attachmentCount - 1)
|
||||
}
|
||||
},
|
||||
addNewCard(state, card) {
|
||||
state.cards.push(card)
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async addCard({ commit }, card) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<files psalm-version="4.16.1@aa7e400908833b10c0333861f86cd48c510b60eb">
|
||||
<files psalm-version="4.22.0@fc2c6ab4d5fa5d644d8617089f012f3bb84b8703">
|
||||
<file src="lib/Activity/ActivityManager.php">
|
||||
<TypeDoesNotContainType occurrences="1">
|
||||
<code>$message !== null</code>
|
||||
@@ -10,17 +10,6 @@
|
||||
<code>(int)$subjectParams['comment']</code>
|
||||
</InvalidScalarArgument>
|
||||
</file>
|
||||
<file src="lib/AppInfo/Application.php">
|
||||
<InvalidArgument occurrences="7">
|
||||
<code>registerEventListener</code>
|
||||
<code>registerEventListener</code>
|
||||
<code>registerEventListener</code>
|
||||
<code>registerEventListener</code>
|
||||
<code>registerEventListener</code>
|
||||
<code>registerEventListener</code>
|
||||
<code>registerEventListener</code>
|
||||
</InvalidArgument>
|
||||
</file>
|
||||
<file src="lib/Command/UserExport.php">
|
||||
<ImplementedReturnTypeMismatch occurrences="1">
|
||||
<code>void</code>
|
||||
@@ -49,11 +38,6 @@
|
||||
<code>$this->userId</code>
|
||||
</UndefinedThisPropertyFetch>
|
||||
</file>
|
||||
<file src="lib/Controller/BoardController.php">
|
||||
<UndefinedDocblockClass occurrences="1">
|
||||
<code>\OCP\Deck\DB\Board</code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="lib/Controller/CommentsApiController.php">
|
||||
<InvalidScalarArgument occurrences="6">
|
||||
<code>$cardId</code>
|
||||
@@ -107,11 +91,6 @@
|
||||
<code>$cardId</code>
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="lib/Db/AttachmentMapper.php">
|
||||
<UndefinedVariable occurrences="1">
|
||||
<code>$query</code>
|
||||
</UndefinedVariable>
|
||||
</file>
|
||||
<file src="lib/Db/BoardMapper.php">
|
||||
<ParamNameMismatch occurrences="1">
|
||||
<code>$boardId</code>
|
||||
@@ -184,6 +163,11 @@
|
||||
<code>$stackId</code>
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="lib/Migration/Version10800Date20220422061816.php">
|
||||
<MoreSpecificImplementedParamType occurrences="1">
|
||||
<code>$schemaClosure</code>
|
||||
</MoreSpecificImplementedParamType>
|
||||
</file>
|
||||
<file src="lib/Notification/Notifier.php">
|
||||
<RedundantCast occurrences="4">
|
||||
<code>(string) $l->t('%s has mentioned you in a comment on "%s".', [$dn, $params[0]])</code>
|
||||
|
||||
Reference in New Issue
Block a user