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

Not possible to create card with label #303

Closed
daverees4 opened this issue Feb 8, 2022 · 2 comments
Closed

Not possible to create card with label #303

daverees4 opened this issue Feb 8, 2022 · 2 comments
Assignees
Labels

Comments

@daverees4
Copy link

daverees4 commented Feb 8, 2022

Thanks for the great library! Everything is working fine, except I ran into trouble creating a card with a label.

For example this doesn't work for me - the card with the title is created but no label added:

label=Trello::Label.find("labelid")
list=Trello::List.find("listid")
card=Trello::Card.new(list_id: list.id, name: "Testcard", labels: [label]).save

I can get the label to add after the card has been created:

card.add_label(label).save

@hoppergee hoppergee self-assigned this Feb 8, 2022
@hoppergee hoppergee added this to Draft in Backlog via automation Feb 8, 2022
@hoppergee hoppergee added this to the 3.1.0 milestone Feb 8, 2022
@hoppergee hoppergee added Bug QA and removed Bug labels Feb 8, 2022
@hoppergee hoppergee removed this from the 3.1.0 milestone Feb 8, 2022
@hoppergee
Copy link
Collaborator

The labels attribute is a read-only attribute due to Trello API.

You can use card_labels which needs to assign label IDs on it.

@hoppergee hoppergee removed this from Draft in Backlog Feb 8, 2022
@daverees4
Copy link
Author

daverees4 commented Feb 8, 2022 via email

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

No branches or pull requests

2 participants