Merge pull request #3215 from gvespignani70/develop

changed edit_card and get_card_by_customfields
This commit is contained in:
Lauri Ojansivu 2020-07-21 21:03:00 +03:00 committed by GitHub
commit eba8fb4c9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 40 deletions

View file

@ -2420,34 +2420,6 @@ if (Meteor.isServer) {
}, },
); );
} }
if (req.body.hasOwnProperty('listId')) {
const newParamListId = req.body.listId;
Cards.direct.update(
{
_id: paramCardId,
listId: paramListId,
boardId: paramBoardId,
archived: false,
},
{
$set: {
listId: newParamListId,
},
},
);
const card = Cards.findOne({
_id: paramCardId,
});
cardMove(
req.body.authorId,
card,
{
fieldName: 'listId',
},
paramListId,
);
}
if (req.body.hasOwnProperty('parentId')) { if (req.body.hasOwnProperty('parentId')) {
const newParentId = req.body.parentId; const newParentId = req.body.parentId;
Cards.direct.update( Cards.direct.update(
@ -2691,6 +2663,34 @@ if (Meteor.isServer) {
{ $set: { swimlaneId: newParamSwimlaneId } }, { $set: { swimlaneId: newParamSwimlaneId } },
); );
} }
if (req.body.hasOwnProperty('listId')) {
const newParamListId = req.body.listId;
Cards.direct.update(
{
_id: paramCardId,
listId: paramListId,
boardId: paramBoardId,
archived: false,
},
{
$set: {
listId: newParamListId,
},
},
);
const card = Cards.findOne({
_id: paramCardId,
});
cardMove(
req.body.authorId,
card,
{
fieldName: 'listId',
},
paramListId,
);
}
JsonRoutes.sendResult(res, { JsonRoutes.sendResult(res, {
code: 200, code: 200,
data: { data: {
@ -2772,15 +2772,7 @@ if (Meteor.isServer) {
}, },
}, },
archived: false, archived: false,
}).map(function(doc) { }).fetch(),
return {
_id: doc._id,
title: doc.title,
description: doc.description,
listId: doc.listId,
swinlaneId: doc.swinlaneId,
};
}),
}); });
}, },
); );

View file

@ -1136,9 +1136,9 @@ if (Meteor.isServer) {
*/ */
const Future = require('fibers/future'); const Future = require('fibers/future');
let future1 = new Future(); const future1 = new Future();
let future2 = new Future(); const future2 = new Future();
let future3 = new Future(); const future3 = new Future();
Boards.insert( Boards.insert(
{ {
title: TAPi18n.__('templates'), title: TAPi18n.__('templates'),