nextcloud / nextcloud/deck

Trello JSON or API fails on card import

Open
#5,572 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug feature: export/import
Dominant language
JavaScript
Stars
1.4k
Forks
354
Avg merge
1d 10h
Merged PRs (30d)
43

Description

Hi,

On importing a Trello board using either JSON or API, the list (stack) names will import but no cards import. Both fail with the same exact same error in TrelloJsonService.php:

Importing cards...
An unhandled exception has been thrown:
Error: Call to a member function getId() on null in /var/snap/nextcloud/39212/nextcloud/extra-apps/deck/lib/Service/Importer/Systems/TrelloJsonService.php:278
Stack trace:
#0 /var/snap/nextcloud/39212/nextcloud/extra-apps/deck/lib/Service/Importer/BoardImportService.php(285): OCA\Deck\Service\Importer\Systems\TrelloJsonService->getCards()
#1 /var/snap/nextcloud/39212/nextcloud/extra-apps/deck/lib/Service/Importer/BoardImportCommandService.php(232): OCA\Deck\Service\Importer\BoardImportService->importCards()
#2 /var/snap/nextcloud/39212/nextcloud/extra-apps/deck/lib/Command/BoardImport.php(92): OCA\Deck\Service\Importer\BoardImportCommandService->import()
#3 /snap/nextcloud/39212/htdocs/3rdparty/symfony/console/Command/Command.php(298): OCA\Deck\Command\BoardImport->execute()
#4 /snap/nextcloud/39212/htdocs/3rdparty/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#5 /snap/nextcloud/39212/htdocs/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#6 /snap/nextcloud/39212/htdocs/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#7 /snap/nextcloud/39212/htdocs/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#8 /snap/nextcloud/39212/htdocs/console.php(100): OC\Console\Application->run()
#9 /snap/nextcloud/39212/htdocs/occ(11): require_once('...')

Line # 278 is:
$card->setStackId($this->stacks[$trelloCard->idList]->getId());

Deck v1.11.3
Nextcloud v27.1.4

Just adding for reference for grouping even though this is different, there are also https://github.com/nextcloud/deck/issues/5136 and https://github.com/nextcloud/deck/issues/4818

Thank you

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/Service/Importer/Systems/TrelloJsonService.php at line 278 and trace how getCards() receives data from BoardImportService.php. Reproduce the failure with both Trello JSON and API imports, then inspect the referenced list lookup before changing behavior. Done means cards import successfully through both paths without the null getId() exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.