Beispiel #1
0
        public Card GetCardByExternalId(string externalId)
        {
            if (IsPrefixEnabled && externalId.StartsWith(Prefix))
            {
                externalId = externalId.TrimStart(Prefix.ToCharArray());
            }

            CardView cardView = Lanes.SelectMany(lane => lane.Cards).FirstOrDefault(c => c.ExternalCardID == externalId);

            if (cardView == null)
            {
                cardView = Backlog.SelectMany(lane => lane.Cards).FirstOrDefault(c => c.ExternalCardID == externalId);
            }
            if (cardView == null)
            {
                cardView = Archive.SelectMany(lane => lane.Cards).FirstOrDefault(c => c.ExternalCardID == externalId);
            }

            return(cardView == null ? null : cardView.ToCard());
        }