private Card setCheckListOnCard(Card c,CheckList cl){
List<String> arrayIdOfCheckList=new ArrayList<>();
String cardId=c.getId(); //returns empty
cl.setId(String.valueOf(UUID.randomUUID());
String checkListId=cl.getId();
arrayIdOfCheckList.add(checkListId);
c.setIdChecklists(arrayIdOfCheckList);
Card updatedCard=c.update();
return updatedCard;
}
How can we associate checklist to card?
Assume that the card already exists on trello server side in this snippet thus the card has an ID.
On the other hand,my check list exists only on my client side at this point so the checklist does not have an ID,
I tried to set unique id to the checklist here.
With c.setIdChecklists(arrayIdOfCheckList), Card c is successfully associated with
an arrayIdOfCheckList however, after card is updated, returned (Card)updatedCard losts
arrayIdOfCheckList.
Do you have any idea of what's wrong with my snippet?