public function build(\AgileDashboard_Milestone_Backlog_IBacklogItem $backlog_item, array $card_fields)
 {
     $this->id = JsonCast::toInt($backlog_item->id());
     $this->label = $backlog_item->title();
     $this->status = $backlog_item->status();
     $this->type = $backlog_item->type();
     $this->short_type = $backlog_item->short_type();
     $this->initial_effort = JsonCast::toFloat($backlog_item->getInitialEffort());
     $this->color = $backlog_item->color();
     $this->artifact = new ArtifactReference();
     $this->artifact->build($backlog_item->getArtifact());
     $this->project = new ProjectReference();
     $this->project->build($backlog_item->getArtifact()->getTracker()->getProject());
     $this->parent = null;
     if ($backlog_item->getParent()) {
         $this->parent = new BacklogItemParentReference();
         $this->parent->build($backlog_item->getParent());
     }
     $this->has_children = $backlog_item->hasChildren();
     $this->addAllowedSubItemTypes($backlog_item);
     if ($card_fields) {
         $this->card_fields = $card_fields;
     }
 }