public EntityDocument CreateImpediment(ImpedimentDTO impediment)
        {
            string name                        = EntityDocument.CreateName(impediment.ImpedimentID);
            string nameDescription             = string.Format("{0} {1}", impediment.Name, impediment.Description ?? String.Empty);
            var    nameDescriptionCustomFields = AppendCustomFields(nameDescription, impediment.CustomFieldsMetaInfo);
            string text                        = _textOperations.Prepare(nameDescriptionCustomFields);

            return(new EntityDocument(name, text)
            {
                ProjectId = _documentIdFactory.CreateProjectId(impediment.ProjectID.GetValueOrDefault()),
                EntityTypeId = _documentIdFactory.CreateEntityTypeId(impediment.EntityTypeID.GetValueOrDefault()),
                SquadId = _documentIdFactory.CreateSquadId(0),
                DocNumber = -1
            });
        }
 private void UpdateImpedimentIndex(ImpedimentDTO impedimentDto, ICollection <ImpedimentField> changedImpedimentFields)
 {
     RebuildOrAction(() => _entityIndexer.UpdateImpedimentIndex(impedimentDto, changedImpedimentFields, false, DocumentIndexOptimizeSetup.DeferredOptimize));
 }
 private void RemoveImpedimentIndex(ImpedimentDTO impedimentDto)
 {
     RebuildOrAction(() => _entityIndexer.RemoveImpedimentIndex(impedimentDto));
 }
 private void AddImpedimentIndex(ImpedimentDTO impedimentDto)
 {
     RebuildOrAction(() => _entityIndexer.AddImpedimentIndex(impedimentDto, DocumentIndexOptimizeSetup.DeferredOptimize));
 }