Repository navigation
Expand file tree
/
Copy pathCardView.cs
More file actions
172 lines (164 loc) · 6.57 KB
/
Copy pathCardView.cs
File metadata and controls
172 lines (164 loc) · 6.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
//------------------------------------------------------------------------------
// <copyright company="LeanKit Inc.">
// Copyright (c) LeanKit Inc. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace LeanKit.API.Client.Library.TransferObjects
{
[DebuggerDisplay("{GetType().Name,nq} [{Id}] {Title}")]
public class CardView
{
public string SystemType { get; set; }
public long Id { get; set; }
public long LaneId { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public CardType Type { get; set; }
public long TypeId { get; set; }
public PriorityType Priority { get; set; }
public string PriorityText
{
get { return Priority.ToString(); }
}
public string TypeName { get; set; }
public string TypeIconPath { get; set; }
public string TypeColorHex { get; set; }
public int Size { get; set; }
public bool Active { get; set; }
public string Color { get; set; }
public long Version { get; set; }
public bool IsBlocked { get; set; }
public string BlockReason { get; set; }
public int Index { get; set; }
public string StartDate { get; set; }
public string DueDate { get; set; }
public string ExternalSystemName { get; set; }
public string ExternalSystemUrl { get; set; }
public string ExternalCardID { get; set; }
public string Tags { get; set; }
public long? ClassOfServiceId { get; set; }
public string ClassOfServiceTitle { get; set; }
public string ClassOfServiceIconPath { get; set; }
public string ClassOfServiceColorHex { get; set; }
public int CountOfOldCards { get; set; }
public string LastMove { get; set; }
public string LastActivity { get; set; }
public string DateArchived { get; set; }
public string LastComment { get; set; }
public int CommentsCount { get; set; }
public string LastAttachment { get; set; }
public int AttachmentsCount { get; set; }
public long? AssignedUserId { get; set; }
public long[] AssignedUserIds { get; set; }
public List<AssignedUserInfo> AssignedUsers { get; set; }
public long? DrillThroughBoardId { get; set; }
public bool HasDrillThroughBoard
{
get { return DrillThroughBoardId.HasValue; }
}
public List<Comment> Comments { get; set; }
public List<CardEvent> HistoryEvents { get; set; }
public long? ParentCardId { get; set; }
public long? ParentBoardId { get; set; }
public string ExternalCardIdPrefix { get; set; }
public string ActualFinishDate { get; set; }
public string ActualStartDate { get; set; }
public string AssignedUserName { get; set; }
public string BlockStateChangeDate { get; set; }
public long BoardId { get; set; }
public string BoardTitle { get; set; }
public List<CardContextView> CardContexts { get; set; }
public string CardTypeIconColor { get; set; }
public string CardTypeIconName { get; set; }
public string ClassOfServiceCustomIconColor { get; set; }
public string ClassOfServiceCustomIconName { get; set; }
public string CreateDate { get; set; }
public string CurrentContext { get; set; }
public long? CurrentTaskBoardId { get; set; }
public int? DrillThroughCompletionPercent { get; set; }
public int? DrillThroughProgressTotal { get; set; }
public int? DrillThroughProgressComplete { get; set; }
public int? DrillThroughProgressSizeComplete { get; set; }
public int? DrillThroughProgressSizeTotal { get; set; }
public string GravatarLink { get; set; }
public string Icon { get; set; }
public bool IsOlderThanXDays { get; set; }
public string LaneTitle { get; set; }
public long? ParentTaskboardId { get; set; }
public string SmallGravatarLink { get; set; }
public int? TaskBoardCompletionPercent { get; set; }
public int TaskBoardCompletedCardCount { get; set; }
public int TaskBoardCompletedCardSize { get; set; }
public int? TaskBoardTotalCards { get; set; }
public int? TaskBoardTotalSize { get; set; }
public Card ToCard()
{
var card = new Card();
card.Active = Active;
card.ClassOfServiceId = ClassOfServiceId;
card.BlockReason = BlockReason;
card.Description = Description;
card.StartDate = StartDate;
card.DueDate = DueDate;
card.ExternalCardID = ExternalCardID;
card.ExternalSystemName = ExternalSystemName;
card.ExternalSystemUrl = ExternalSystemUrl;
card.ExternalCardIdPrefix = ExternalCardIdPrefix;
card.Id = Id;
card.Index = Index;
card.IsBlocked = IsBlocked;
card.LaneId = LaneId;
card.Priority = (int) Priority;
card.Size = Size;
card.Tags = Tags;
card.Title = Title;
card.TypeId = TypeId;
card.Version = Version;
card.AssignedUserIds = (AssignedUsers != null)
? (AssignedUserIds != null) ? AssignedUserIds : AssignedUsers.Select(x => x.Id.Value).ToArray()
: null;
card.Comments = Comments;
card.HistoryEvents = HistoryEvents;
card.LastMove = LastMove;
card.LastActivity = LastActivity;
card.LastComment = LastComment;
card.DateArchived = DateArchived;
card.ParentCardId = ParentCardId;
card.ParentBoardId = ParentBoardId;
card.ActualFinishDate = ActualFinishDate;
card.ActualStartDate = ActualStartDate;
card.AssignedUserName = AssignedUserName;
card.BlockStateChangeDate = BlockStateChangeDate;
card.BoardId = BoardId;
card.BoardTitle = BoardTitle;
card.CardContexts = CardContexts;
card.CardTypeIconColor = CardTypeIconColor;
card.CardTypeIconName = CardTypeIconName;
card.ClassOfServiceCustomIconColor = ClassOfServiceCustomIconColor;
card.ClassOfServiceCustomIconName = ClassOfServiceCustomIconName;
card.CreateDate = CreateDate;
card.CurrentContext = CurrentContext;
card.CurrentTaskBoardId = CurrentTaskBoardId;
card.DrillThroughCompletionPercent = DrillThroughCompletionPercent;
card.DrillThroughProgressTotal = DrillThroughProgressTotal;
card.DrillThroughProgressComplete = DrillThroughProgressComplete;
card.DrillThroughProgressSizeComplete = DrillThroughProgressSizeComplete;
card.DrillThroughProgressSizeTotal = DrillThroughProgressSizeTotal;
card.GravatarLink = GravatarLink;
card.Icon = Icon;
card.IsOlderThanXDays = IsOlderThanXDays;
card.LaneTitle = LaneTitle;
card.ParentTaskboardId = ParentTaskboardId;
card.SmallGravatarLink = SmallGravatarLink;
card.TaskBoardCompletionPercent = TaskBoardCompletionPercent;
card.TaskBoardCompletedCardCount = TaskBoardCompletedCardCount;
card.TaskBoardCompletedCardSize = TaskBoardCompletedCardSize;
card.TaskBoardTotalCards = TaskBoardTotalCards;
card.TaskBoardTotalSize = TaskBoardTotalSize;
return card;
}
}
}