mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
Only search label names in boards of type 'board'
This commit is contained in:
parent
e43002d5ad
commit
69dc8f304c
3 changed files with 4 additions and 2 deletions
|
|
@ -505,6 +505,7 @@ Boards.attachSchema(
|
||||||
type: {
|
type: {
|
||||||
/**
|
/**
|
||||||
* The type of board
|
* The type of board
|
||||||
|
* possible values: board, template-board, template-container
|
||||||
*/
|
*/
|
||||||
type: String,
|
type: String,
|
||||||
defaultValue: 'board',
|
defaultValue: 'board',
|
||||||
|
|
|
||||||
|
|
@ -299,6 +299,7 @@ Cards.attachSchema(
|
||||||
type: {
|
type: {
|
||||||
/**
|
/**
|
||||||
* type of the card
|
* type of the card
|
||||||
|
* possible values: cardType-card, cardType-linkedCard, cardType-linkedBoard
|
||||||
*/
|
*/
|
||||||
type: String,
|
type: String,
|
||||||
defaultValue: 'cardType-card',
|
defaultValue: 'cardType-card',
|
||||||
|
|
|
||||||
|
|
@ -294,7 +294,7 @@ function buildSelector(queryParams) {
|
||||||
queryParams.getPredicates(OPERATOR_LABEL).forEach(label => {
|
queryParams.getPredicates(OPERATOR_LABEL).forEach(label => {
|
||||||
const queryLabels = [];
|
const queryLabels = [];
|
||||||
|
|
||||||
let boards = Boards.userSearch(userId, {
|
let boards = Boards.userBoards(userId, null, {
|
||||||
labels: { $elemMatch: { color: label.toLowerCase() } },
|
labels: { $elemMatch: { color: label.toLowerCase() } },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -318,7 +318,7 @@ function buildSelector(queryParams) {
|
||||||
const reLabel = new RegExp(escapeForRegex(label), 'i');
|
const reLabel = new RegExp(escapeForRegex(label), 'i');
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
// console.log('reLabel:', reLabel);
|
// console.log('reLabel:', reLabel);
|
||||||
boards = Boards.userSearch(userId, {
|
boards = Boards.userBoards(userId, null, {
|
||||||
labels: { $elemMatch: { name: reLabel } },
|
labels: { $elemMatch: { name: reLabel } },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue