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

Investigate custom/required fields for cards #1

Open
3 tasks done
chrisman opened this issue May 30, 2018 · 3 comments
Open
3 tasks done

Investigate custom/required fields for cards #1

chrisman opened this issue May 30, 2018 · 3 comments
Assignees
Projects

Comments

@chrisman
Copy link
Owner

chrisman commented May 30, 2018

  • Can fields be required when creating a card?

  • Create a custom field (for capturing arbitrary data in a webhook)

  • How to make an API call for attachments?

@chrisman chrisman created this issue from a note in pdqq (To do) May 30, 2018
@squeemishly squeemishly self-assigned this May 30, 2018
@squeemishly
Copy link
Collaborator

creating cards by email

@squeemishly
Copy link
Collaborator

@squeemishly
Copy link
Collaborator

Summary:

Required Fields

I don't think it's possible to create a required field. But we could work around that by making required fields in our Form that are then used to populate the API call.

Custom Fields

Creating a custom field might be a little complicated. It looks like we'll need to create the card, and then get the ID of the card back from Trello. Then use the ID of the card to add a custom field to it.

curl -X POST -H "Content-Type: application/json" \
https://api.trello.com/1/customFields \
-d '{
  idModel: "5a00adcebe1991022b4a4bb4",
  modelType: "board",
  name: "My Dropdown",
  options: [,
    {
      color: "none",
      value: {
        text: "First Option"
      }, 
      pos: 1024
    },
    {
      color: "none",
      value: {
        text: "Second Option"
      }, 
      pos: 2048
    }
  ],
  pos: "bottom",
  type: "list",
  display_cardFront: false
}'

Attachments

Also, I couldn't find a conclusive way of making an API call for attachments. I do think it's possible, but I need to play with the code some to test it. In the mean time, it also looks like we can make cards via email, and the attachment process on that is SUPER simple. Email doesn't offer anywhere near the level of robust options we need, but it is super cool...

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

No branches or pull requests

2 participants