mirror of
https://github.com/plankanban/planka.git
synced 2025-07-22 22:59:44 +02:00
Preserve members and labels when transfer card to another board
This commit is contained in:
parent
5e0b2b9f0a
commit
044fe17dbf
17 changed files with 321 additions and 64 deletions
17
server/api/helpers/get-label-ids-for-card.js
Normal file
17
server/api/helpers/get-label-ids-for-card.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
module.exports = {
|
||||
inputs: {
|
||||
id: {
|
||||
type: 'json',
|
||||
custom: (value) => _.isString(value) || _.isArray(value),
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
async fn(inputs, exits) {
|
||||
const cardLabels = await sails.helpers.getCardLabelsForCard(inputs.id);
|
||||
|
||||
const labelIds = sails.helpers.mapRecords(cardLabels, 'labelId', _.isArray(inputs.id));
|
||||
|
||||
return exits.success(labelIds);
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue