public IEnumerable <JsonMergeMethod> GetJsonMergeMethods(JsonProject project, JsonMergeEnvironment environment) { return(new List <JsonMergeMethod> { new JsonMergeMethod { method = WorkItemQueryMethod.State, name = "State", selected = true, options = environment.states.Select(state => new JsonMergeMethodOption { project = project, method = WorkItemQueryMethod.State, methodValue = state, selected = true }) }, new JsonMergeMethod { method = WorkItemQueryMethod.SavedQuery, name = "Saved Query" }, new JsonMergeMethod { method = WorkItemQueryMethod.DynamicQuery, name = "Dynamic Query" } }); }
/// <summary> /// gets changesets for specified work item /// </summary> /// <param name="model"></param> /// <param name="environment"></param> /// <returns></returns> public IEnumerable <JsonMergeCandidateChangeset> GetJsonChangesets(JsonWorkItem model, JsonMergeEnvironment environment) { return(BLL.Source.GetChangesets(SourceDataAccess, (WorkItem)model, (MergeEnvironment)environment).Select(c => new JsonMergeCandidateChangeset(c, environment))); }
public IEnumerable <JsonMergeCandidateChangeset> GetJsonMergeCandidates(JsonProject project, JsonMergeEnvironment environment) { var result = BLL.Source.GetMergeCandidates(SourceDataAccess, (Project)project, (MergeEnvironment)environment); return(result != null?result.Select(c => new JsonMergeCandidateChangeset(c, environment)) : null); }
/// <summary> /// commits pending changes for a changeset that have been merged for the specified target and maps to the desired view model /// </summary> /// <param name="environment"></param> /// <param name="comment"></param> /// <param name="changeset"></param> public JsonChangeset JsonCommitChangeset(IJsonChangeset changeset, JsonMergeEnvironment environment, string comment) { var result = BLL.Source.CommitChangeset(SourceDataAccess, (Changeset) new JsonChangeset(changeset), (MergeEnvironment)environment, comment); return(result != null ? new JsonChangeset(result) : null); }