internal static void MoveWorkBetweenBuckets(RteWorkItem workItem, int id) { if (id == 0) { return; } var area = areas.Get(workItem.AreaPath); var fromState = workItem.States[id - 1].Value; var toState = workItem.States[id].Value; var fromBucket = BucketType.Backlog; if (fromState == "New" || fromState == "Proposed" || fromState == "Ready") { fromBucket = BucketType.Backlog; } else if (fromState == "Active") { fromBucket = BucketType.Commited; } else { fromBucket = BucketType.Done; } var toBucket = BucketType.Backlog; if (toState == "New" || toState == "Proposed" || toState == "Ready") { toBucket = BucketType.Backlog; } else if (toState == "Active") { toBucket = BucketType.Commited; } else { toBucket = BucketType.Done; } if (fromBucket != toBucket) { area.RemoveItemFromBucket(workItem, workItem.States[id].Key.Date, fromBucket); area.AddItemToBucket(workItem, workItem.States[id].Key.Date, toBucket); } }
private static void AddWorkItemToAreaBucket(RteWorkItem workItem, DateTime created) { var area = areas.Get(workItem.AreaPath); area.AddItemToBucket(workItem, created.Date, BucketType.Backlog); }
public void RemoveItemFromBucket(RteWorkItem workItem, DateTime date, BucketType bucket) { buckets[bucket].Remove(workItem, date); }
public void AddItemToBucket(RteWorkItem workItem, DateTime date, BucketType bucket) { buckets[bucket].Add(workItem, date); }
public Change(RteWorkItem workItem, DateTime date, ChangeType type) { this.workItem = workItem; this.date = date; this.type = type; }
internal void Remove(RteWorkItem workItem, DateTime date) { changes.Add(new Change(workItem, date, ChangeType.Remove)); }
internal void Add(RteWorkItem workItem, DateTime date) { changes.Add(new Change(workItem, date, ChangeType.Add)); }