question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Card description is replaced by template card description after changing it

See original GitHub issue

Describe the bug The card description (main text) is replaced by the template card description shortly after setting a custom description.

To Reproduce I don’t know a way to exactly reproduce the error, but it has been reported more than once by our users. It affects a certain kind of card for us, but so far I do not know what makes it special.

The basic process is as follows:

  1. Copy card from a template (which also has a description)
  2. Set name, description and position
  3. Upload an attachment
  4. Set custom fields

Expected behavior The description set in step 2 stays.

Desktop (please complete the following information):

  • OS: Windows Server
  • .NET Framework 4.6.2
  • Manatee.Trello 3.10, Manatee.Json 10.1.3

Additional context

  • No changes to the config except TrelloConfiguration.ThrowOnTrelloError = true;

  • The code creating the copy follows. The code snippet refers to message which contains this deserialized bit of data:

    {
      "BoardId": "4f2ef2f82e7ecf843fb79644",
      "ListId": "52ce972a1c855c5a309edd85",
      "TemplateCardId": "58eb98323a7c5202d3f48a28",
      "Title": "the title that stays",
      "Description": "this is the description that should stay",
      "Attachments": {
        "$type": "Ops.Contracts.Model.Trello.Attachment[], Ops.Contracts",
        "$values": [
          {
            "Name": "some file.yaml",
            "BinaryData": "some data"
          }
        ]
      },
      "Fields": {
        "$type": "Ops.Contracts.Model.Trello.Mapping[], Ops.Contracts",
        "$values": [
          {
            "Data": "2019-09-19T11:24:24.5704536+02:00",
            "FieldName": "some date"
          }
        ]
      }
    }
    
        var board = _trello.Board(message.BoardId);
        await board.Lists.Refresh();
        var list = board.Lists[message.ListId];
        var cards = list.Cards;
    
        ICard card;
        if (message.TemplateCardId != null)
        {
          card = await cards.Add(_trello.Card(message.TemplateCardId),
                                 CardCopyKeepFromSourceOptions.All);
        }
        else
        {
          card = await cards.Add(message.Title);
        }
    
        card.Name = message.Title;
        card.Description = message.Description;
        card.Position = Position.Top;
    
        var tasks = message.Attachments?
                           .ToList()
                           .Select(x => card.Attachments.Add(x.BinaryData, x.Name));
        if (tasks != null)
        {
          await Task.WhenAll(tasks);
        }
    
        await MapFields(message, board, card);
    

    MapFields is responsible to set custom field values and to transform data types. No errors are logged.

To debug this issue further, is there a way to force a flush of in-memory card data to the Trello API or to force a re-read from the Trello API?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:23 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
agrosscommented, Nov 25, 2019

@gregsdennis The workaround you provided appears to have fixed our problems with the card descriptions. I’m in favor of keeping this issue open and hopefully find a solution that does not require to change Manatee.Trello’s internal optimizations.

0reactions
gregsdenniscommented, Nov 25, 2019

@agross any luck?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Update Trello Card Template & Push the new ...
When moving Cards between them it will work. As far as I know there is no solution for changing in one place Custom...
Read more >
Create Card templates - essentially two different .. ...
I am wanting to create two different card templates. One that provides different information around various roles (more like an information ...
Read more >
Applying a template to any or all Trello cards
It seems like we can't apply a template to an existing card. It would be even better to apply a template to all...
Read more >
Bring Consistency To Your Workflow With Trello Card ...
Click the card template icon at the bottom right corner of any card; Click “Create a new template”; Name your template and then...
Read more >
Change the contact card template in Contacts on Mac
Change the contact card template in Contacts on Mac. Choose the fields that appear on new contact cards in Contacts. Existing cards aren't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found