Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Card edit API has duplicated variable names for board move functionality instead of using existing ones #5398

Open
C0rn3j opened this issue May 4, 2024 · 1 comment

Comments

@C0rn3j
Copy link
Contributor

C0rn3j commented May 4, 2024

#5090 added ability to move cards to other boards lists but it added three new variables for Board, List and Swimlane making the API much more confusing.

move card list using listId: https://github.com/DimDz/wekan/blob/32e50b869dbbdd1fc23fcd8607ea25098208c9d9/models/cards.js#L3807-L3821

move card swimlane using swimlaneId: https://github.com/DimDz/wekan/blob/32e50b869dbbdd1fc23fcd8607ea25098208c9d9/models/cards.js#L3795-L3806

move card board using newBoardId, newSwimlaneId and newListId https://github.com/DimDz/wekan/blob/32e50b869dbbdd1fc23fcd8607ea25098208c9d9/models/cards.js#L3833-L3860:

So now the 7.44 API docs have:

list	path	string	true	the list ID of the card
» listId	body	string	false	the new list ID of the card (move operation)
» newListId	body	string	true	the newListId value

and now for example, passing newListId won't do anything because the functionality is there just for board moves.

I suggest to just add singular boardId instead and not dupe the other two variables.
That means the body.listId and body.swimlaneId checks need an additional && ! BoardId check, so they're skipped in case the entire board is being moved.

@DimDz

@xet7
Copy link
Member

xet7 commented May 4, 2024

@C0rn3j

Please send PR to make it less confusing. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants