Compare commits

..

1 Commits

Author SHA1 Message Date
Gary Kim
2ae8fee6b3 In Progress Board Import
Signed-off-by: Gary Kim <gary@garykim.dev>
2020-01-07 12:21:59 +08:00
21 changed files with 602 additions and 594 deletions

View File

@@ -1,19 +1,6 @@
# Changelog
All notable changes to this project will be documented in this file.
## 0.8.0 - 2020-01-16
## Added
- Case insensitive search (@matchish)
## Fixed
- Fix reversed permissions for reordering stacks (@JLueke)
- Fix reversed visibility of 'add stack' field (@JLueke)
- Fix occ export command
- Fix error causing cron execution to fail
- Fix activity entry on moving cards
- Proper wording in activity timeline (@a11exandru)
## 0.7.0 - 2019-08-20
## Added

View File

@@ -84,7 +84,7 @@ test-unit:
ifeq (, $(shell which phpunit 2> /dev/null))
@echo "No phpunit command available, downloading a copy from the web"
mkdir -p $(build_tools_directory)
curl -sSL https://phar.phpunit.de/phpunit-8.2.phar -o $(build_tools_directory)/phpunit.phar
curl -sSL https://phar.phpunit.de/phpunit-5.7.phar -o $(build_tools_directory)/phpunit.phar
php $(build_tools_directory)/phpunit.phar -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml
php $(build_tools_directory)/phpunit.phar -c tests/phpunit.integration.xml --coverage-clover build/php-integration.coverage.xml
else

View File

@@ -17,7 +17,7 @@
- 🚀 Get your project organized
</description>
<version>0.8.0</version>
<version>0.7.0</version>
<licence>agpl</licence>
<author>Julius Härtl</author>
<namespace>Deck</namespace>

View File

@@ -651,33 +651,6 @@ The board list endpoint supports setting an `If-Modified-Since` header to limit
##### 200 Success
```json
{
"id": 3,
"participant": {
"primaryKey": "admin",
"uid": "admin",
"displayname": "admin"
},
"cardId": 1
}
```
##### 400 Bad request
```json
{
"status": 400,
"message": "The user is already assigned to the card"
}
```
The request can fail with a bad request response for the following reasons:
- Missing or wrongly formatted request parameters
- The user is already assigned to the card
- The user is not part of the board
### PUT /boards/{boardId}/stacks/{stackId}/cards/{cardId}/unassignUser - Assign a user to a card
#### Request parameters

View File

@@ -4,20 +4,20 @@
* @author Julius Härtl <jus@bitgrid.net>
*
* @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/>.
*
*
*/
import app from '../app/App.js';
@@ -31,9 +31,7 @@ app.filter('cardSearchFilter', function() {
angular.forEach(cards, function(card){
var _card = card;
Object.keys(rules).some(function(rule) {
var pattern = rules[rule];
// eslint-disable-next-line detect-non-literal-regexp
if(_card[rule].search(new RegExp(pattern, 'i'))>=0) {
if(_card[rule].search(rules[rule])>=0) {
_result[_card.id] = _card;
}
});

396
js/package-lock.json generated
View File

@@ -5,45 +5,20 @@
"requires": true,
"dependencies": {
"@babel/cli": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.8.3.tgz",
"integrity": "sha512-K2UXPZCKMv7KwWy9Bl4sa6+jTNP7JyDiHKzoOiUUygaEDbC60vaargZDnO9oFMvlq8pIKOOyUUgeMYrsaN9djA==",
"version": "7.6.4",
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.6.4.tgz",
"integrity": "sha512-tqrDyvPryBM6xjIyKKUwr3s8CzmmYidwgdswd7Uc/Cv0ogZcuS1TYQTLx/eWKP3UbJ6JxZAiYlBZabXm/rtRsQ==",
"requires": {
"chokidar": "^2.1.8",
"commander": "^4.0.1",
"commander": "^2.8.1",
"convert-source-map": "^1.1.0",
"fs-readdir-recursive": "^1.1.0",
"glob": "^7.0.0",
"lodash": "^4.17.13",
"make-dir": "^2.1.0",
"mkdirp": "^0.5.1",
"output-file-sync": "^2.0.0",
"slash": "^2.0.0",
"source-map": "^0.5.0"
},
"dependencies": {
"commander": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-4.1.0.tgz",
"integrity": "sha512-NIQrwvv9V39FHgGFm36+U9SMQzbiHvU79k+iADraJTpmrFFfx7Ds0IvDoAdZsDrknlkRk14OYoWXb57uTh7/sw=="
},
"make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"requires": {
"pify": "^4.0.1",
"semver": "^5.6.0"
}
},
"pify": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g=="
},
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
}
}
},
"@babel/code-frame": {
@@ -198,14 +173,26 @@
}
},
"@babel/generator": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.3.tgz",
"integrity": "sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==",
"version": "7.6.4",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.4.tgz",
"integrity": "sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w==",
"requires": {
"@babel/types": "^7.8.3",
"@babel/types": "^7.6.3",
"jsesc": "^2.5.1",
"lodash": "^4.17.13",
"source-map": "^0.5.0"
},
"dependencies": {
"@babel/types": {
"version": "7.6.3",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz",
"integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==",
"requires": {
"esutils": "^2.0.2",
"lodash": "^4.17.13",
"to-fast-properties": "^2.0.0"
}
}
}
},
"@babel/helper-annotate-as-pure": {
@@ -361,23 +348,16 @@
}
},
"@babel/helper-create-class-features-plugin": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.3.tgz",
"integrity": "sha512-qmp4pD7zeTxsv0JNecSBsEmG1ei2MqwJq4YQcK3ZWm/0t07QstWfvuV/vm3Qt5xNMFETn2SZqpMx2MQzbtq+KA==",
"version": "7.6.0",
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.6.0.tgz",
"integrity": "sha512-O1QWBko4fzGju6VoVvrZg0RROCVifcLxiApnGP3OWfWzvxRZFCoBD81K5ur5e3bVY2Vf/5rIJm8cqPKn8HUJng==",
"requires": {
"@babel/helper-function-name": "^7.8.3",
"@babel/helper-member-expression-to-functions": "^7.8.3",
"@babel/helper-optimise-call-expression": "^7.8.3",
"@babel/helper-plugin-utils": "^7.8.3",
"@babel/helper-replace-supers": "^7.8.3",
"@babel/helper-split-export-declaration": "^7.8.3"
},
"dependencies": {
"@babel/helper-plugin-utils": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz",
"integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ=="
}
"@babel/helper-function-name": "^7.1.0",
"@babel/helper-member-expression-to-functions": "^7.5.5",
"@babel/helper-optimise-call-expression": "^7.0.0",
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/helper-replace-supers": "^7.5.5",
"@babel/helper-split-export-declaration": "^7.4.4"
}
},
"@babel/helper-create-regexp-features-plugin": {
@@ -555,21 +535,21 @@
}
},
"@babel/helper-function-name": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz",
"integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==",
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz",
"integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==",
"requires": {
"@babel/helper-get-function-arity": "^7.8.3",
"@babel/template": "^7.8.3",
"@babel/types": "^7.8.3"
"@babel/helper-get-function-arity": "^7.0.0",
"@babel/template": "^7.1.0",
"@babel/types": "^7.0.0"
}
},
"@babel/helper-get-function-arity": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz",
"integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz",
"integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==",
"requires": {
"@babel/types": "^7.8.3"
"@babel/types": "^7.0.0"
}
},
"@babel/helper-hoist-variables": {
@@ -593,11 +573,23 @@
}
},
"@babel/helper-member-expression-to-functions": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz",
"integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==",
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz",
"integrity": "sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA==",
"requires": {
"@babel/types": "^7.8.3"
"@babel/types": "^7.5.5"
},
"dependencies": {
"@babel/types": {
"version": "7.6.3",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz",
"integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==",
"requires": {
"esutils": "^2.0.2",
"lodash": "^4.17.13",
"to-fast-properties": "^2.0.0"
}
}
}
},
"@babel/helper-module-imports": {
@@ -669,11 +661,11 @@
}
},
"@babel/helper-optimise-call-expression": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz",
"integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz",
"integrity": "sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==",
"requires": {
"@babel/types": "^7.8.3"
"@babel/types": "^7.0.0"
}
},
"@babel/helper-plugin-utils": {
@@ -805,14 +797,26 @@
}
},
"@babel/helper-replace-supers": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.3.tgz",
"integrity": "sha512-xOUssL6ho41U81etpLoT2RTdvdus4VfHamCuAm4AHxGr+0it5fnwoVdwUJ7GFEqCsQYzJUhcbsN9wB9apcYKFA==",
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz",
"integrity": "sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg==",
"requires": {
"@babel/helper-member-expression-to-functions": "^7.8.3",
"@babel/helper-optimise-call-expression": "^7.8.3",
"@babel/traverse": "^7.8.3",
"@babel/types": "^7.8.3"
"@babel/helper-member-expression-to-functions": "^7.5.5",
"@babel/helper-optimise-call-expression": "^7.0.0",
"@babel/traverse": "^7.5.5",
"@babel/types": "^7.5.5"
},
"dependencies": {
"@babel/types": {
"version": "7.6.3",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz",
"integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==",
"requires": {
"esutils": "^2.0.2",
"lodash": "^4.17.13",
"to-fast-properties": "^2.0.0"
}
}
}
},
"@babel/helper-simple-access": {
@@ -852,11 +856,23 @@
}
},
"@babel/helper-split-export-declaration": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz",
"integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==",
"version": "7.4.4",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz",
"integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==",
"requires": {
"@babel/types": "^7.8.3"
"@babel/types": "^7.4.4"
},
"dependencies": {
"@babel/types": {
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz",
"integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==",
"requires": {
"esutils": "^2.0.2",
"lodash": "^4.17.13",
"to-fast-properties": "^2.0.0"
}
}
}
},
"@babel/helper-wrap-function": {
@@ -1130,9 +1146,9 @@
}
},
"@babel/parser": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz",
"integrity": "sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ=="
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.2.tgz",
"integrity": "sha512-x5HFsW+E/nQalGMw7hu+fvPqnBeBaIr0lWJ2SG0PPL2j+Pm9lYvCrsZJGIgauPIENx0v10INIyFjmSNUD/gSqQ=="
},
"@babel/plugin-proposal-async-generator-functions": {
"version": "7.7.4",
@@ -1238,18 +1254,11 @@
}
},
"@babel/plugin-syntax-typescript": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.8.3.tgz",
"integrity": "sha512-GO1MQ/SGGGoiEXY0e0bSpHimJvxqB7lktLLIq2pv8xG7WZ8IMEle74jIe1FhprHBWjwjZtXHkycDLZXIWM5Wfg==",
"version": "7.3.3",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.3.3.tgz",
"integrity": "sha512-dGwbSMA1YhVS8+31CnPR7LB4pcbrzcV99wQzby4uAfrkZPYZlQ7ImwdpzLqi6Z6IL02b8IAL379CaMwo0x5Lag==",
"requires": {
"@babel/helper-plugin-utils": "^7.8.3"
},
"dependencies": {
"@babel/helper-plugin-utils": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz",
"integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ=="
}
"@babel/helper-plugin-utils": "^7.0.0"
}
},
"@babel/plugin-transform-arrow-functions": {
@@ -1842,20 +1851,13 @@
}
},
"@babel/plugin-transform-typescript": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.8.3.tgz",
"integrity": "sha512-Ebj230AxcrKGZPKIp4g4TdQLrqX95TobLUWKd/CwG7X1XHUH1ZpkpFvXuXqWbtGRWb7uuEWNlrl681wsOArAdQ==",
"version": "7.6.3",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.6.3.tgz",
"integrity": "sha512-aiWINBrPMSC3xTXRNM/dfmyYuPNKY/aexYqBgh0HBI5Y+WO5oRAqW/oROYeYHrF4Zw12r9rK4fMk/ZlAmqx/FQ==",
"requires": {
"@babel/helper-create-class-features-plugin": "^7.8.3",
"@babel/helper-plugin-utils": "^7.8.3",
"@babel/plugin-syntax-typescript": "^7.8.3"
},
"dependencies": {
"@babel/helper-plugin-utils": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz",
"integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ=="
}
"@babel/helper-create-class-features-plugin": "^7.6.0",
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/plugin-syntax-typescript": "^7.2.0"
}
},
"@babel/plugin-transform-unicode-regex": {
@@ -1959,83 +1961,61 @@
}
},
"@babel/preset-typescript": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.8.3.tgz",
"integrity": "sha512-qee5LgPGui9zQ0jR1TeU5/fP9L+ovoArklEqY12ek8P/wV5ZeM/VYSQYwICeoT6FfpJTekG9Ilay5PhwsOpMHA==",
"version": "7.6.0",
"resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.6.0.tgz",
"integrity": "sha512-4xKw3tTcCm0qApyT6PqM9qniseCE79xGHiUnNdKGdxNsGUc2X7WwZybqIpnTmoukg3nhPceI5KPNzNqLNeIJww==",
"requires": {
"@babel/helper-plugin-utils": "^7.8.3",
"@babel/plugin-transform-typescript": "^7.8.3"
},
"dependencies": {
"@babel/helper-plugin-utils": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz",
"integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ=="
}
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/plugin-transform-typescript": "^7.6.0"
}
},
"@babel/template": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz",
"integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==",
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.2.tgz",
"integrity": "sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag==",
"requires": {
"@babel/code-frame": "^7.8.3",
"@babel/parser": "^7.8.3",
"@babel/types": "^7.8.3"
},
"dependencies": {
"@babel/code-frame": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz",
"integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==",
"requires": {
"@babel/highlight": "^7.8.3"
}
},
"@babel/highlight": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz",
"integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==",
"requires": {
"chalk": "^2.0.0",
"esutils": "^2.0.2",
"js-tokens": "^4.0.0"
}
}
"@babel/code-frame": "^7.0.0",
"@babel/parser": "^7.1.2",
"@babel/types": "^7.1.2"
}
},
"@babel/traverse": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz",
"integrity": "sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==",
"version": "7.6.3",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.3.tgz",
"integrity": "sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw==",
"requires": {
"@babel/code-frame": "^7.8.3",
"@babel/generator": "^7.8.3",
"@babel/helper-function-name": "^7.8.3",
"@babel/helper-split-export-declaration": "^7.8.3",
"@babel/parser": "^7.8.3",
"@babel/types": "^7.8.3",
"@babel/code-frame": "^7.5.5",
"@babel/generator": "^7.6.3",
"@babel/helper-function-name": "^7.1.0",
"@babel/helper-split-export-declaration": "^7.4.4",
"@babel/parser": "^7.6.3",
"@babel/types": "^7.6.3",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.13"
},
"dependencies": {
"@babel/code-frame": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz",
"integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==",
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
"integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
"requires": {
"@babel/highlight": "^7.8.3"
"@babel/highlight": "^7.0.0"
}
},
"@babel/highlight": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz",
"integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==",
"@babel/parser": {
"version": "7.6.4",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.4.tgz",
"integrity": "sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A=="
},
"@babel/types": {
"version": "7.6.3",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz",
"integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==",
"requires": {
"chalk": "^2.0.0",
"esutils": "^2.0.2",
"js-tokens": "^4.0.0"
"lodash": "^4.17.13",
"to-fast-properties": "^2.0.0"
}
},
"debug": {
@@ -2054,13 +2034,20 @@
}
},
"@babel/types": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz",
"integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==",
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.2.tgz",
"integrity": "sha512-pb1I05sZEKiSlMUV9UReaqsCPUpgbHHHu2n1piRm7JkuBkm6QxcaIzKu6FMnMtCbih/cEYTR+RGYYC96Yk9HAg==",
"requires": {
"esutils": "^2.0.2",
"lodash": "^4.17.13",
"lodash": "^4.17.10",
"to-fast-properties": "^2.0.0"
},
"dependencies": {
"to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
"integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
}
}
},
"@nextcloud/auth": {
@@ -2096,9 +2083,9 @@
},
"dependencies": {
"core-js": {
"version": "3.6.4",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz",
"integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw=="
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.3.3.tgz",
"integrity": "sha512-0xmD4vUJRY8nfLyV9zcpC17FtSie5STXzw+HyYw2t8IIvmDnbq7RJUULECCo+NstpJtwK9kx8S+898iyqgeUow=="
}
}
},
@@ -2111,9 +2098,9 @@
},
"dependencies": {
"core-js": {
"version": "3.6.4",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz",
"integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw=="
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.3.3.tgz",
"integrity": "sha512-0xmD4vUJRY8nfLyV9zcpC17FtSie5STXzw+HyYw2t8IIvmDnbq7RJUULECCo+NstpJtwK9kx8S+898iyqgeUow=="
}
}
},
@@ -2456,6 +2443,7 @@
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
@@ -2588,11 +2576,12 @@
"integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio="
},
"axios": {
"version": "0.19.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.1.tgz",
"integrity": "sha512-Yl+7nfreYKaLRvAvjNPkvfjnQHJM1yLBY3zhqAwcJSwR/6ETkanUgylgtIvkvz0xJ+p/vZuNw8X7Hnb7Whsbpw==",
"version": "0.19.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
"integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
"requires": {
"follow-redirects": "1.5.10"
"follow-redirects": "1.5.10",
"is-buffer": "^2.0.2"
},
"dependencies": {
"debug": {
@@ -2610,6 +2599,11 @@
"requires": {
"debug": "=3.1.0"
}
},
"is-buffer": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
}
}
},
@@ -3126,6 +3120,7 @@
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
@@ -3136,6 +3131,7 @@
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
@@ -3259,8 +3255,7 @@
"commander": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
"dev": true
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ=="
},
"commondir": {
"version": "1.0.1",
@@ -3343,9 +3338,9 @@
"dev": true
},
"convert-source-map": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
"integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz",
"integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==",
"requires": {
"safe-buffer": "~5.1.1"
}
@@ -3868,11 +3863,6 @@
"integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=",
"dev": true
},
"entities": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz",
"integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw=="
},
"errno": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
@@ -5241,8 +5231,7 @@
"is-plain-obj": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
"integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=",
"dev": true
"integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4="
},
"is-plain-object": {
"version": "2.0.4",
@@ -5645,6 +5634,13 @@
"linkify-it": "^2.0.0",
"mdurl": "^1.0.1",
"uc.micro": "^1.0.5"
},
"dependencies": {
"entities": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz",
"integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw=="
}
}
},
"markdown-it-link-target": {
@@ -5821,8 +5817,7 @@
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
},
"mississippi": {
"version": "3.0.0",
@@ -5865,7 +5860,6 @@
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"requires": {
"minimist": "0.0.8"
}
@@ -5952,9 +5946,9 @@
}
},
"nextcloud-vue": {
"version": "0.12.11",
"resolved": "https://registry.npmjs.org/nextcloud-vue/-/nextcloud-vue-0.12.11.tgz",
"integrity": "sha512-3zzgSRpWtPMqIi+DpZsh0YxACACHv+j8bWmMYyiUJVB2JjVADYpzb/lbUxQCE/A8rB3N75zIfkQOf0gd9BC9oA==",
"version": "0.12.8",
"resolved": "https://registry.npmjs.org/nextcloud-vue/-/nextcloud-vue-0.12.8.tgz",
"integrity": "sha512-4TU5Ji7560cRo14iaRgvVo4+Z6iQCWw6VU26dQaYWD8G3BUoZMQXCrETGyMW5kpP/ODW4cLVVzjlYaVosyqoOA==",
"requires": {
"@babel/polyfill": "^7.4.4",
"escape-html": "^1.0.3",
@@ -6197,6 +6191,16 @@
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true
},
"output-file-sync": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-2.0.1.tgz",
"integrity": "sha512-mDho4qm7WgIXIGf4eYU1RHN2UU5tPfVYVSRwDJw0uTmj35DQUt/eNp19N7v6T3SrR0ESTEf2up2CGO73qI35zQ==",
"requires": {
"graceful-fs": "^4.1.11",
"is-plain-obj": "^1.1.0",
"mkdirp": "^0.5.1"
}
},
"p-defer": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",

View File

@@ -4,18 +4,11 @@ OC.L10N.register(
"Hours" : "ساعت ها",
"Minutes" : "دقایق",
"Personal" : "شخصی",
"Finished" : "تمام شده",
"Done" : "انجام شد",
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "حداکثر حجم قابل بار گذاری از طریق HTML MAX_FILE_SIZE است",
"No file was uploaded" : "هیچ پروندهای بارگذاری نشده",
"Missing a temporary folder" : "یک پوشه موقت گم شده",
"Share board" : "صفحه مشترک",
"Actions" : "فعالیت ها",
"Assign card to me" : "کارت را به من اختصاص دهید",
"Unassign card from me" : "جدا کردن کارت از من",
"Archive card" : "کارت بایگانی",
"Delete card" : "حذف کارت",
"Add card" : "کارت اضافه کنید",
"Close" : "بستن",
"Sharing" : "اشتراک گذاری",
"Tags" : "برچسب‌ها",
@@ -25,18 +18,11 @@ OC.L10N.register(
"Share" : "هم‌رسانی",
"Create" : "ایجاد کردن",
"Title" : "عنوان",
"More actions" : "اقدامات بیشتر",
"Edit board" : "ویرایش تخته ها",
"Archive board" : " بایگانی تابلو",
"Delete board" : "حذف تابلو",
"Cancel upload" : "متوقف کردن بار گذاری",
"by" : "با",
"Modified:" : "تغییر یافته توسط:",
"Created:" : "ایجاد شده توسط:",
"Assign users" : "اختصاص کاربران",
"Due date" : "موعد مقرر",
"Description" : "توضیحات",
"Attachments" : "پیوست ها",
"Saved" : "ذخیره شد",
"Settings" : "تنظیمات"
},

View File

@@ -2,18 +2,11 @@
"Hours" : "ساعت ها",
"Minutes" : "دقایق",
"Personal" : "شخصی",
"Finished" : "تمام شده",
"Done" : "انجام شد",
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "حداکثر حجم قابل بار گذاری از طریق HTML MAX_FILE_SIZE است",
"No file was uploaded" : "هیچ پروندهای بارگذاری نشده",
"Missing a temporary folder" : "یک پوشه موقت گم شده",
"Share board" : "صفحه مشترک",
"Actions" : "فعالیت ها",
"Assign card to me" : "کارت را به من اختصاص دهید",
"Unassign card from me" : "جدا کردن کارت از من",
"Archive card" : "کارت بایگانی",
"Delete card" : "حذف کارت",
"Add card" : "کارت اضافه کنید",
"Close" : "بستن",
"Sharing" : "اشتراک گذاری",
"Tags" : "برچسب‌ها",
@@ -23,18 +16,11 @@
"Share" : "هم‌رسانی",
"Create" : "ایجاد کردن",
"Title" : "عنوان",
"More actions" : "اقدامات بیشتر",
"Edit board" : "ویرایش تخته ها",
"Archive board" : " بایگانی تابلو",
"Delete board" : "حذف تابلو",
"Cancel upload" : "متوقف کردن بار گذاری",
"by" : "با",
"Modified:" : "تغییر یافته توسط:",
"Created:" : "ایجاد شده توسط:",
"Assign users" : "اختصاص کاربران",
"Due date" : "موعد مقرر",
"Description" : "توضیحات",
"Attachments" : "پیوست ها",
"Saved" : "ذخیره شد",
"Settings" : "تنظیمات"
},"pluralForm" :"nplurals=2; plural=(n > 1);"

View File

@@ -69,7 +69,6 @@ OC.L10N.register(
"You have updated the attachment {attachment} on card {card}" : "Vous avez mis à jour la pièce jointe {attachment} de la carte {card}",
"{user} has updated the attachment {attachment} on card {card}" : "{user} a mis à jour la pièce jointe {attachment} de la carte {card}",
"You have deleted the attachment {attachment} from card {card}" : "Vous avez supprimé la pièce jointe {attachment} de la carte {card}",
"{user} has deleted the attachment {attachment} from card {card}" : "{user} a supprimé la pièce jointe {attachment} de la carte {card}",
"You have restored the attachment {attachment} to card {card}" : "Vous avez restauré la pièce jointe {attachment} de la carte {card}",
"{user} has restored the attachment {attachment} to card {card}" : "{user} a restauré la pièce jointe {attachment} de la carte {card}",
"You have commented on card {card}" : "Vous avez commenté la carte {card}",

View File

@@ -67,7 +67,6 @@
"You have updated the attachment {attachment} on card {card}" : "Vous avez mis à jour la pièce jointe {attachment} de la carte {card}",
"{user} has updated the attachment {attachment} on card {card}" : "{user} a mis à jour la pièce jointe {attachment} de la carte {card}",
"You have deleted the attachment {attachment} from card {card}" : "Vous avez supprimé la pièce jointe {attachment} de la carte {card}",
"{user} has deleted the attachment {attachment} from card {card}" : "{user} a supprimé la pièce jointe {attachment} de la carte {card}",
"You have restored the attachment {attachment} to card {card}" : "Vous avez restauré la pièce jointe {attachment} de la carte {card}",
"{user} has restored the attachment {attachment} to card {card}" : "{user} a restauré la pièce jointe {attachment} de la carte {card}",
"You have commented on card {card}" : "Vous avez commenté la carte {card}",

View File

@@ -67,9 +67,7 @@ OC.L10N.register(
"You have added the attachment {attachment} to card {card}" : "Dodali ste privitak {attachment} kartici {card}",
"{user} has added the attachment {attachment} to card {card}" : "{user} je dodao privitak {attachment} kartici {card}",
"You have updated the attachment {attachment} on card {card}" : "Ažurirali ste privitak {attachment} na kartici {card}",
"{user} has updated the attachment {attachment} on card {card}" : "{user} je ažurirao privitak {attachment} na kartici {card}",
"You have deleted the attachment {attachment} from card {card}" : "Izbrisali ste privitak {attachment} s kartice {card}",
"{user} has deleted the attachment {attachment} from card {card}" : "{user} je izbrisao privitak {attachment} s kartice {card}",
"You have restored the attachment {attachment} to card {card}" : "Vratili ste privitak {attachment} na karticu {card}",
"{user} has restored the attachment {attachment} to card {card}" : "{user} je vratio privitak {attachment} na karticu {card}",
"You have commented on card {card}" : "Komentirali ste karticu {card}",

View File

@@ -65,9 +65,7 @@
"You have added the attachment {attachment} to card {card}" : "Dodali ste privitak {attachment} kartici {card}",
"{user} has added the attachment {attachment} to card {card}" : "{user} je dodao privitak {attachment} kartici {card}",
"You have updated the attachment {attachment} on card {card}" : "Ažurirali ste privitak {attachment} na kartici {card}",
"{user} has updated the attachment {attachment} on card {card}" : "{user} je ažurirao privitak {attachment} na kartici {card}",
"You have deleted the attachment {attachment} from card {card}" : "Izbrisali ste privitak {attachment} s kartice {card}",
"{user} has deleted the attachment {attachment} from card {card}" : "{user} je izbrisao privitak {attachment} s kartice {card}",
"You have restored the attachment {attachment} to card {card}" : "Vratili ste privitak {attachment} na karticu {card}",
"{user} has restored the attachment {attachment} to card {card}" : "{user} je vratio privitak {attachment} na karticu {card}",
"You have commented on card {card}" : "Komentirali ste karticu {card}",

View File

@@ -67,9 +67,7 @@ OC.L10N.register(
"You have added the attachment {attachment} to card {card}" : "Je voegde bijlage {attachment} toe aan kaart {card}",
"{user} has added the attachment {attachment} to card {card}" : "{user} voegde bijlage {attachment} toe aan kaart {card}",
"You have updated the attachment {attachment} on card {card}" : "Je werkte bijlage {attachment} bij op kaart {card}",
"{user} has updated the attachment {attachment} on card {card}" : "{user} werkte bijlage {attachment} bij op kaart {card}",
"You have deleted the attachment {attachment} from card {card}" : "Je verwijderde bijlage {attachment} van kaart {card}",
"{user} has deleted the attachment {attachment} from card {card}" : "{user} verwijderde bijlage {attachment} van kaart {card}",
"You have restored the attachment {attachment} to card {card}" : "Je herstelde bijlage {attachment} bij kaart {card}",
"{user} has restored the attachment {attachment} to card {card}" : "{user} herstelde bijlage {attachment} bij kaart {card}",
"You have commented on card {card}" : "Je hebt gereageerd op kaart {card}",

View File

@@ -65,9 +65,7 @@
"You have added the attachment {attachment} to card {card}" : "Je voegde bijlage {attachment} toe aan kaart {card}",
"{user} has added the attachment {attachment} to card {card}" : "{user} voegde bijlage {attachment} toe aan kaart {card}",
"You have updated the attachment {attachment} on card {card}" : "Je werkte bijlage {attachment} bij op kaart {card}",
"{user} has updated the attachment {attachment} on card {card}" : "{user} werkte bijlage {attachment} bij op kaart {card}",
"You have deleted the attachment {attachment} from card {card}" : "Je verwijderde bijlage {attachment} van kaart {card}",
"{user} has deleted the attachment {attachment} from card {card}" : "{user} verwijderde bijlage {attachment} van kaart {card}",
"You have restored the attachment {attachment} to card {card}" : "Je herstelde bijlage {attachment} bij kaart {card}",
"{user} has restored the attachment {attachment} to card {card}" : "{user} herstelde bijlage {attachment} bij kaart {card}",
"You have commented on card {card}" : "Je hebt gereageerd op kaart {card}",

View File

@@ -1,30 +0,0 @@
OC.L10N.register(
"deck",
{
"Finished" : "Završeno",
"Done" : "Done",
"Share board" : "Podeli tablu",
"Assign card to me" : "Dodeli karticu meni",
"Unassign card from me" : "Skloni karticu sa mene",
"Archive card" : "Arhiviraj karticu",
"Delete card" : "Obriši karticu",
"Add card" : "Dodaj karticu",
"Close" : "Zatvori",
"Sharing" : "Deljenje",
"Tags" : "Oznake",
"Group" : "Group",
"Loading" : "Loading",
"Edit" : "Uredi",
"Share" : "Deljenje",
"Create" : "Napravi",
"Title" : "Naslov",
"Edit board" : "Izmeni tablu",
"Archive board" : "Arhiviraj tablu",
"Delete board" : "Izbriši tablu",
"Assign users" : "Dodelite korisnike",
"Due date" : "Rok",
"Description" : "Opis",
"Attachments" : "Prilozi",
"Settings" : "Postavke"
},
"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);");

View File

@@ -1,28 +0,0 @@
{ "translations": {
"Finished" : "Završeno",
"Done" : "Done",
"Share board" : "Podeli tablu",
"Assign card to me" : "Dodeli karticu meni",
"Unassign card from me" : "Skloni karticu sa mene",
"Archive card" : "Arhiviraj karticu",
"Delete card" : "Obriši karticu",
"Add card" : "Dodaj karticu",
"Close" : "Zatvori",
"Sharing" : "Deljenje",
"Tags" : "Oznake",
"Group" : "Group",
"Loading" : "Loading",
"Edit" : "Uredi",
"Share" : "Deljenje",
"Create" : "Napravi",
"Title" : "Naslov",
"Edit board" : "Izmeni tablu",
"Archive board" : "Arhiviraj tablu",
"Delete board" : "Izbriši tablu",
"Assign users" : "Dodelite korisnike",
"Due date" : "Rok",
"Description" : "Opis",
"Attachments" : "Prilozi",
"Settings" : "Postavke"
},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"
}

166
lib/Command/UserImport.php Normal file
View File

@@ -0,0 +1,166 @@
<?php
/**
* @copyright Copyright (c) 2020 Gary Kim <gary@garykim.dev>
*
* @author Gary Kim <gary@garykim.dev>
*
* @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\Command;
use OCA\Deck\Db\AssignedUsersMapper;
use OCA\Deck\Db\Board;
use OCA\Deck\Db\BoardMapper;
use OCA\Deck\Db\Card;
use OCA\Deck\Db\CardMapper;
use OCA\Deck\Db\Label;
use OCA\Deck\Db\LabelMapper;
use OCA\Deck\Db\Stack;
use OCA\Deck\Db\StackMapper;
use OCA\Deck\Service\BoardService;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Db\MultipleObjectsReturnedException;
use OCP\IGroupManager;
use OCP\IUserManager;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class UserImport extends Command {
/** @var BoardMapper */
protected $boardMapper;
/** @var BoardService */
protected $boardService;
/** @var CardMapper */
protected $cardMapper;
/** @var LabelMapper */
protected $labelMapper;
/** @var StackMapper */
protected $stackMapper;
/** @var IUserManager */
private $userManager;
/** @var IGroupManager */
private $groupManager;
/** @var AssignedUsersMapper */
private $assignedUsersMapper;
public function __construct(BoardMapper $boardMapper,
BoardService $boardService,
StackMapper $stackMapper,
CardMapper $cardMapper,
LabelMapper $labelMapper,
AssignedUsersMapper $assignedUsersMapper,
IUserManager $userManager,
IGroupManager $groupManager) {
parent::__construct();
$this->cardMapper = $cardMapper;
$this->boardService = $boardService;
$this->stackMapper = $stackMapper;
$this->labelMapper = $labelMapper;
$this->assignedUsersMapper = $assignedUsersMapper;
$this->boardMapper = $boardMapper;
$this->userManager = $userManager;
$this->groupManager = $groupManager;
}
protected function configure() {
$this
->setName('deck:import')
->setDescription('Import a JSON dump of user data')
->addArgument(
'user-id',
InputArgument::REQUIRED,
'User ID of the user to get ownership'
)
->addArgument(
'input-file',
InputArgument::REQUIRED,
'JSON file to import'
)
;
}
/**
* @param InputInterface $input
* @param OutputInterface $output
* @return void
*/
protected function execute(InputInterface $input, OutputInterface $output) {
$userId = $input->getArgument('user-id');
$this->boardService->setUserId($userId);
$file = fopen($input->getArgument('input-file'));
$data = json_decode(fread($file, filesize($input->getArgument('input-file'))));
foreach ($data as $board) {
// New Board
$newBoard = new Board();
$newBoard->setTitle($board['title']);
$newBoard->setOwner($userId);
$newBoard->setColor($board['color']);
$this->boardMapper->insert($newBoard);
// Import labels for board
foreach ($board['labels'] as $label) {
$newLabel = new Label();
$newLabel->setTitle($label['title']);
$newLabel->setColor($label['color']);
$newLabel->setBoardId($label['boardId']);
$this->labelMapper->insert($newLabel);
}
// Import stacks for board
foreach ($board['stacks'] as $stack) {
$newStack = new Stack();
$newStack->setTitle($stack['title']);
$newStack->setBoardId($stack['boardId']);
$newStack->setId($stack['id']);
$this->stackMapper->insert($newStack);
// Import cards for stack
foreach ($stack['cards'] as $card) {
$newCard = new Card();
$newCard->setTitle($label['title']);
$newCard->setDescription($label['description']);
$newCard->setStackId($card['stackId']);
$newCard->setLastModified($card[''])
$newCard->setId($card['id']);
}
}
}
$output->writeln(json_encode($data, JSON_PRETTY_PRINT));
}
}

View File

@@ -588,17 +588,10 @@ class CardService {
$assignments = $this->assignedUsersMapper->find($cardId);
foreach ($assignments as $assignment) {
if ($assignment->getParticipant() === $userId) {
throw new BadRequestException('The user is already assigned to the card');
return false;
}
}
$card = $this->cardMapper->find($cardId);
$boardId = $this->cardMapper->findBoardId($cardId);
$boardUsers = array_keys($this->permissionService->findUsers($boardId, true));
if (!in_array($userId, $boardUsers)) {
throw new BadRequestException('The user is not part of the board');
}
if ($userId !== $this->currentUser) {
/* Notifyuser about the card assignment */

View File

@@ -221,9 +221,9 @@ class PermissionService {
* @param $boardId
* @return array
*/
public function findUsers($boardId, $refresh = false) {
public function findUsers($boardId) {
// cache users of a board so we don't query them for every cards
if (array_key_exists((string) $boardId, $this->users) && !$refresh) {
if (array_key_exists((string) $boardId, $this->users)) {
return $this->users[(string) $boardId];
}
try {

View File

@@ -102,25 +102,34 @@ class AssignedUsersMapperTest extends \Test\TestCase {
$this->stacks = $stacks;
}
/**
* @covers ::__construct
*/
public function testConstructor() {
//$this->assertAttributeInstanceOf(IDBConnection::class, 'db', $this->assignedUsersMapper);
//$this->assertAttributeEquals(AssignedUsers::class, 'entityClass', $this->assignedUsersMapper);
//$this->assertAttributeEquals('*PREFIX*deck_assigned_users', 'tableName', $this->assignedUsersMapper);
}
/**
* @covers ::find
*/
public function testFind() {
$uids = [];
$this->cardService->assignUser($this->cards[0]->getId(), self::TEST_USER1);
$this->cardService->assignUser($this->cards[0]->getId(), self::TEST_USER2);
$this->cardService->assignUser($this->cards[0]->getId(), self::TEST_USER4);
$assignedUsers = $this->assignedUsersMapper->find($this->cards[0]->getId());
foreach ($assignedUsers as $user) {
$uids[$user->getParticipant()] = $user;
}
$this->assertArrayHasKey(self::TEST_USER1, $uids);
$this->assertArrayHasKey(self::TEST_USER2, $uids);
$this->assertArrayNotHasKey(self::TEST_USER2, $uids);
$this->assertArrayNotHasKey(self::TEST_USER3, $uids);
$this->assertArrayNotHasKey(self::TEST_USER4, $uids);
$this->assertArrayHasKey(self::TEST_USER4, $uids);
$this->cardService->unassignUser($this->cards[0]->getId(), self::TEST_USER1);
$this->cardService->unassignUser($this->cards[0]->getId(), self::TEST_USER2);
$this->cardService->unassignUser($this->cards[0]->getId(), self::TEST_USER4);
}
/**

View File

@@ -25,7 +25,6 @@ namespace OCA\Deck\Service;
use OCA\Deck\Activity\ActivityManager;
use OCA\Deck\BadRequestException;
use OCA\Deck\Db\AssignedUsers;
use OCA\Deck\Db\AssignedUsersMapper;
use OCA\Deck\Db\Card;
@@ -47,22 +46,22 @@ use Test\TestCase;
class CardServiceTest extends TestCase {
/** @var CardService|MockObject */
private $cardService;
/** @var CardMapper|MockObject */
private $cardMapper;
/** @var StackMapper|MockObject */
private $stackMapper;
/** @var PermissionService|MockObject */
private $permissionService;
/** @var NotificationHelper */
private $notificationHelper;
/** @var AssignedUsersMapper|MockObject */
private $assignedUsersMapper;
/** @var BoardService|MockObject */
private $boardService;
/** @var LabelMapper|MockObject */
private $labelMapper;
/** @var CardService|MockObject */
private $cardService;
/** @var CardMapper|MockObject */
private $cardMapper;
/** @var StackMapper|MockObject */
private $stackMapper;
/** @var PermissionService|MockObject */
private $permissionService;
/** @var NotificationHelper */
private $notificationHelper;
/** @var AssignedUsersMapper|MockObject */
private $assignedUsersMapper;
/** @var BoardService|MockObject */
private $boardService;
/** @var LabelMapper|MockObject */
private $labelMapper;
private $boardMapper;
/** @var AttachmentService|MockObject */
private $attachmentService;
@@ -78,15 +77,15 @@ class CardServiceTest extends TestCase {
private $changeHelper;
public function setUp(): void {
parent::setUp();
$this->cardMapper = $this->createMock(CardMapper::class);
$this->stackMapper = $this->createMock(StackMapper::class);
$this->boardMapper = $this->createMock(BoardMapper::class);
$this->labelMapper = $this->createMock(LabelMapper::class);
$this->permissionService = $this->createMock(PermissionService::class);
$this->boardService = $this->createMock(BoardService::class);
$this->notificationHelper = $this->createMock(NotificationHelper::class);
$this->assignedUsersMapper = $this->createMock(AssignedUsersMapper::class);
parent::setUp();
$this->cardMapper = $this->createMock(CardMapper::class);
$this->stackMapper = $this->createMock(StackMapper::class);
$this->boardMapper = $this->createMock(BoardMapper::class);
$this->labelMapper = $this->createMock(LabelMapper::class);
$this->permissionService = $this->createMock(PermissionService::class);
$this->boardService = $this->createMock(BoardService::class);
$this->notificationHelper = $this->createMock(NotificationHelper::class);
$this->assignedUsersMapper = $this->createMock(AssignedUsersMapper::class);
$this->attachmentService = $this->createMock(AttachmentService::class);
$this->activityManager = $this->createMock(ActivityManager::class);
$this->commentsManager = $this->createMock(ICommentsManager::class);
@@ -109,10 +108,10 @@ class CardServiceTest extends TestCase {
$this->changeHelper,
$this->eventDispatcher,
'user1'
);
}
);
}
public function mockActivity($type, $object, $subject) {
public function mockActivity($type, $object, $subject) {
// ActivityManager::DECK_OBJECT_BOARD, $newAcl, ActivityManager::SUBJECT_BOARD_SHARE
$event = $this->createMock(IEvent::class);
$this->activityManager->expects($this->once())
@@ -124,244 +123,214 @@ class CardServiceTest extends TestCase {
->with($event);
}
public function testFind() {
public function testFind() {
$user = $this->createMock(IUser::class);
$this->userManager->expects($this->once())
->method('get')
->willReturn($user);
$card = new Card();
$card->setId(1337);
$this->cardMapper->expects($this->any())
->method('find')
->with(123)
->willReturn($card);
$this->assignedUsersMapper->expects($this->any())
$card = new Card();
$card->setId(1337);
$this->cardMapper->expects($this->any())
->method('find')
->with(123)
->willReturn($card);
$this->assignedUsersMapper->expects($this->any())
->method('find')
->with(1337)
->willReturn(['user1', 'user2']);
$cardExpected = new Card();
$cardExpected->setId(1337);
$cardExpected->setAssignedUsers(['user1', 'user2']);
$this->assertEquals($cardExpected, $this->cardService->find(123));
}
$this->assertEquals($cardExpected, $this->cardService->find(123));
}
public function testCreate() {
$card = new Card();
$card->setTitle('Card title');
$card->setOwner('admin');
$card->setStackId(123);
$card->setOrder(999);
$card->setType('text');
$this->cardMapper->expects($this->once())
->method('insert')
->willReturn($card);
$b = $this->cardService->create('Card title', 123, 'text', 999, 'admin');
public function testCreate() {
$card = new Card();
$card->setTitle('Card title');
$card->setOwner('admin');
$card->setStackId(123);
$card->setOrder(999);
$card->setType('text');
$this->cardMapper->expects($this->once())
->method('insert')
->willReturn($card);
$b = $this->cardService->create('Card title', 123, 'text', 999, 'admin');
$this->assertEquals($b->getTitle(), 'Card title');
$this->assertEquals($b->getOwner(), 'admin');
$this->assertEquals($b->getType(), 'text');
$this->assertEquals($b->getOrder(), 999);
$this->assertEquals($b->getStackId(), 123);
}
$this->assertEquals($b->getTitle(), 'Card title');
$this->assertEquals($b->getOwner(), 'admin');
$this->assertEquals($b->getType(), 'text');
$this->assertEquals($b->getOrder(), 999);
$this->assertEquals($b->getStackId(), 123);
}
public function testDelete() {
$cardToBeDeleted = new Card();
$this->cardMapper->expects($this->once())
->method('find')
->willReturn($cardToBeDeleted);
$this->cardMapper->expects($this->once())
->method('update')
->willReturn($cardToBeDeleted);
$this->cardService->delete(123);
$this->assertTrue($cardToBeDeleted->getDeletedAt() <= time(), 'deletedAt is in the past');
}
public function testDelete() {
$cardToBeDeleted = new Card();
$this->cardMapper->expects($this->once())
->method('find')
->willReturn($cardToBeDeleted);
$this->cardMapper->expects($this->once())
->method('update')
->willReturn($cardToBeDeleted);
$this->cardService->delete(123);
$this->assertTrue($cardToBeDeleted->getDeletedAt() <= time(), 'deletedAt is in the past');
}
public function testUpdate() {
$card = new Card();
$card->setTitle('title');
$card->setArchived(false);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->once())->method('update')->willReturnCallback(function($c) { return $c; });
$actual = $this->cardService->update(123, 'newtitle', 234, 'text', 999, 'foo', 'admin', '2017-01-01 00:00:00', null);
$this->assertEquals('newtitle', $actual->getTitle());
$this->assertEquals(234, $actual->getStackId());
$this->assertEquals('text', $actual->getType());
$this->assertEquals(999, $actual->getOrder());
$this->assertEquals('foo', $actual->getDescription());
$this->assertEquals('2017-01-01T00:00:00+00:00', $actual->getDuedate());
}
public function testUpdate() {
$card = new Card();
$card->setTitle('title');
$card->setArchived(false);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->once())->method('update')->willReturnCallback(function($c) { return $c; });
$actual = $this->cardService->update(123, 'newtitle', 234, 'text', 999, 'foo', 'admin', '2017-01-01 00:00:00', null);
$this->assertEquals('newtitle', $actual->getTitle());
$this->assertEquals(234, $actual->getStackId());
$this->assertEquals('text', $actual->getType());
$this->assertEquals(999, $actual->getOrder());
$this->assertEquals('foo', $actual->getDescription());
$this->assertEquals('2017-01-01T00:00:00+00:00', $actual->getDuedate());
}
public function testUpdateArchived() {
$card = new Card();
$card->setTitle('title');
$card->setArchived(true);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->never())->method('update');
public function testUpdateArchived() {
$card = new Card();
$card->setTitle('title');
$card->setArchived(true);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->never())->method('update');
$this->expectException(StatusException::class);
$this->cardService->update(123, 'newtitle', 234, 'text', 999, 'foo', 'admin', '2017-01-01 00:00:00', null, true);
}
$this->cardService->update(123, 'newtitle', 234, 'text', 999, 'foo', 'admin', '2017-01-01 00:00:00', null, true);
}
public function testRename() {
$card = new Card();
$card->setTitle('title');
$card->setArchived(false);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->once())->method('update')->willReturnCallback(function($c) { return $c; });
$actual = $this->cardService->rename(123, 'newtitle');
$this->assertEquals('newtitle', $actual->getTitle());
}
public function testRename() {
$card = new Card();
$card->setTitle('title');
$card->setArchived(false);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->once())->method('update')->willReturnCallback(function($c) { return $c; });
$actual = $this->cardService->rename(123, 'newtitle');
$this->assertEquals('newtitle', $actual->getTitle());
}
public function testRenameArchived() {
$card = new Card();
$card->setTitle('title');
$card->setArchived(true);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->never())->method('update');
public function testRenameArchived() {
$card = new Card();
$card->setTitle('title');
$card->setArchived(true);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->never())->method('update');
$this->expectException(StatusException::class);
$this->cardService->rename(123, 'newtitle');
}
public function dataReorder() {
return [
[0, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]],
[0, 9, [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]],
[1, 3, [0, 2, 3, 1, 4, 5, 6, 7, 8, 9]]
];
}
/** @dataProvider dataReorder */
public function testReorder($cardId, $newPosition, $order) {
$cards = $this->getCards();
$cardsTmp = [];
$this->cardMapper->expects($this->at(0))->method('findAll')->willReturn($cards);
$result = $this->cardService->reorder($cardId, 123, $newPosition);
foreach ($result as $card) {
$actual[$card->getOrder()] = $card->getId();
}
$this->assertEquals($order, $actual);
}
private function getCards() {
$cards = [];
for($i=0; $i<10; $i++) {
$cards[$i] = new Card();
$cards[$i]->setTitle($i);
$cards[$i]->setOrder($i);
$cards[$i]->setId($i);
}
return $cards;
}
public function testReorderArchived() {
$card = new Card();
$card->setTitle('title');
$card->setArchived(true);
$this->cardMapper->expects($this->once())->method('findAll')->willReturn([$card]);
$this->cardMapper->expects($this->never())->method('update')->willReturnCallback(function($c) { return $c; });
$this->expectException(StatusException::class);
$actual = $this->cardService->reorder(123, 234, 1);
}
public function testArchive() {
$card = new Card();
$this->assertFalse($card->getArchived());
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->once())->method('update')->willReturnCallback(function($c) {
return $c;
});
$this->assertTrue($this->cardService->archive(123)->getArchived());
}
public function testUnarchive() {
$card = new Card();
$card->setArchived(true);
$this->assertTrue($card->getArchived());
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->once())->method('update')->willReturnCallback(function($c) {
return $c;
});
$this->assertFalse($this->cardService->unarchive(123)->getArchived());
}
public function testAssignLabel() {
$card = new Card();
$card->setArchived(false);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->once())->method('assignLabel');
$this->cardService->assignLabel(123, 999);
}
public function testAssignLabelArchived() {
$card = new Card();
$card->setArchived(true);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->never())->method('assignLabel');
$this->expectException(StatusException::class);
$this->cardService->assignLabel(123, 999);
}
public function testRemoveLabel() {
$card = new Card();
$card->setArchived(false);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->once())->method('removeLabel');
$this->cardService->removeLabel(123, 999);
}
public function testRemoveLabelArchived() {
$card = new Card();
$card->setArchived(true);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->never())->method('removeLabel');
$this->expectException(StatusException::class);
$this->cardService->rename(123, 'newtitle');
}
$this->cardService->removeLabel(123, 999);
}
public function dataReorder() {
return [
[0, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]],
[0, 9, [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]],
[1, 3, [0, 2, 3, 1, 4, 5, 6, 7, 8, 9]]
];
}
/** @dataProvider dataReorder */
public function testReorder($cardId, $newPosition, $order) {
$cards = $this->getCards();
$cardsTmp = [];
$this->cardMapper->expects($this->at(0))->method('findAll')->willReturn($cards);
$result = $this->cardService->reorder($cardId, 123, $newPosition);
foreach ($result as $card) {
$actual[$card->getOrder()] = $card->getId();
}
$this->assertEquals($order, $actual);
}
private function getCards() {
$cards = [];
for($i=0; $i<10; $i++) {
$cards[$i] = new Card();
$cards[$i]->setTitle($i);
$cards[$i]->setOrder($i);
$cards[$i]->setId($i);
}
return $cards;
}
public function testReorderArchived() {
$card = new Card();
$card->setTitle('title');
$card->setArchived(true);
$this->cardMapper->expects($this->once())->method('findAll')->willReturn([$card]);
$this->cardMapper->expects($this->never())->method('update')->willReturnCallback(function($c) { return $c; });
$this->expectException(StatusException::class);
$actual = $this->cardService->reorder(123, 234, 1);
}
public function testArchive() {
$card = new Card();
$this->assertFalse($card->getArchived());
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->once())->method('update')->willReturnCallback(function($c) {
return $c;
});
$this->assertTrue($this->cardService->archive(123)->getArchived());
}
public function testUnarchive() {
$card = new Card();
$card->setArchived(true);
$this->assertTrue($card->getArchived());
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->once())->method('update')->willReturnCallback(function($c) {
return $c;
});
$this->assertFalse($this->cardService->unarchive(123)->getArchived());
}
public function testAssignLabel() {
$card = new Card();
$card->setArchived(false);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->once())->method('assignLabel');
$this->cardService->assignLabel(123, 999);
}
public function testAssignLabelArchived() {
$card = new Card();
$card->setArchived(true);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->never())->method('assignLabel');
$this->expectException(StatusException::class);
$this->cardService->assignLabel(123, 999);
}
public function testRemoveLabel() {
$card = new Card();
$card->setArchived(false);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->once())->method('removeLabel');
$this->cardService->removeLabel(123, 999);
}
public function testRemoveLabelArchived() {
$card = new Card();
$card->setArchived(true);
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
$this->cardMapper->expects($this->never())->method('removeLabel');
$this->expectException(StatusException::class);
$this->cardService->removeLabel(123, 999);
}
public function testAssignUser() {
$assignments = [];
$this->assignedUsersMapper->expects($this->once())
public function testAssignUser() {
$assignments = [];
$this->assignedUsersMapper->expects($this->once())
->method('find')
->with(123)
->willReturn($assignments);
$assignment = new AssignedUsers();
$assignment->setCardId(123);
$assignment->setParticipant('admin');
$this->cardMapper->expects($this->once())
->method('findBoardId')
->willReturn(1);
$this->permissionService->expects($this->once())
->method('findUsers')
->with(1)
->willReturn(['admin' => 'admin', 'user1' => 'user1']);
$this->assignedUsersMapper->expects($this->once())
$assignment = new AssignedUsers();
$assignment->setCardId(123);
$assignment->setParticipant('admin');
$this->assignedUsersMapper->expects($this->once())
->method('insert')
->with($assignment)
->willReturn($assignment);
$actual = $this->cardService->assignUser(123, 'admin');
$this->assertEquals($assignment, $actual);
}
public function testAssignUserNoParticipant() {
$this->expectException(BadRequestException::class);
$this->expectExceptionMessage('The user is not part of the board');
$assignments = [];
$this->assignedUsersMapper->expects($this->once())
->method('find')
->with(123)
->willReturn($assignments);
$assignment = new AssignedUsers();
$assignment->setCardId(123);
$assignment->setParticipant('admin');
$this->cardMapper->expects($this->once())
->method('findBoardId')
->willReturn(1);
$this->permissionService->expects($this->once())
->method('findUsers')
->with(1)
->willReturn(['user2' => 'user2', 'user1' => 'user1']);
$actual = $this->cardService->assignUser(123, 'admin');
$actual = $this->cardService->assignUser(123, 'admin');
$this->assertEquals($assignment, $actual);
}
public function testAssignUserExisting() {
$this->expectException(BadRequestException::class);
$this->expectExceptionMessage('The user is already assigned to the card');
$assignment = new AssignedUsers();
$assignment->setCardId(123);
$assignment->setParticipant('admin');
@@ -395,8 +364,13 @@ class CardServiceTest extends TestCase {
$this->assertEquals($assignment, $actual);
}
/**
* @expectException \OCA\Deck\NotFoundException
*
*
*
*/
public function testUnassignUserNotExisting() {
$this->expectException(NotFoundException::class);
$assignment = new AssignedUsers();
$assignment->setCardId(123);
$assignment->setParticipant('admin');