Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Manager field to Relativity.Testing.Framework.Models.Entity object #130

Open
kamil-makarowski-relativity opened this issue Jan 18, 2022 · 5 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@kamil-makarowski-relativity

Describe the suggested Enhancement

Hi Team,
We are trying to test Entities import with managers linking functionality. In our Functional Tests at the end we assert if Managers were linked to entities. We retrieve Entities using IEntityService.GetAll and to retrieve managers we use ObjectManager. We would be glad if we could assert entities and linked managers using IEntityService.GetAll method.

Example

Entity[] entities = RelativityFacade.Instance.Resolve<IEntityService>().GetAll(Workspace.ArtifactID);
entities.Should().HaveCount(transferredItemsCount);
IEnumerable<object> managers = await GetManagersAsync().ConfigureAwait(false);
managers.Should().Contain(x => x != null);

Expected Behavior

Entity[] entities = RelativityFacade.Instance.Resolve<IEntityService>().GetAll(Workspace.ArtifactID);
entities.Should().HaveCount(transferredItemsCount);
entities.Should().Contain(x => x.Manager != null);

Justification

Entity model would be closer to real Entity RDO

@kamil-makarowski-relativity kamil-makarowski-relativity added enhancement New feature or request untriaged Needs to be reviewed by a maintainer and assigned a priority. labels Jan 18, 2022
@paulletang
Copy link
Contributor

Hey @kamil-makarowski-relativity,

If manager is on all Entities, I agree that it should be reflected in the model, but I'm not seeing it in Relativity.

I took a look at the fields for Entities
image

And also inspected the API request
image

Do you know why I'm seeing something different from what you're expecting?

@briantoms
Copy link
Contributor

The Entity object type is shared among multiple applications. It looks like the Manager field is only included in the Legal Hold application.

Link to internal documentation: https://einstein.kcura.com/x/EmkFCQ

@paulletang
Copy link
Contributor

paulletang commented Jan 18, 2022

So we'll only see it after LegalHold is installed then.

I think it's going to be pretty difficult to conditionally have these fields on the model based on what applications are installed.
It doesn't feel quite right to have all fields on the model for every possible application either.

We'll give this some thought.

@paulletang
Copy link
Contributor

Hey @kamil-makarowski-relativity

The ObjectManager service lets you pass in arbitrary DTOs, so you should be able to define one that more closely adheres to the LegalHold fields.

You should be able to subclass off of Entity, and then add in any additional fields that you're looking for.
The code should look something similar to this:

	[ObjectTypeName("Entity")]
	internal class LegalHoldEntity : Entity
	{
		public ManagerObject Manager { get; set; }
	}
	return _objectService.Query<LegalHoldEntity>().For(workspaceId).ToArray();

@paulletang paulletang added question Further information is requested and removed untriaged Needs to be reviewed by a maintainer and assigned a priority. labels Jan 18, 2022
@kamil-makarowski-relativity
Copy link
Author

Hi @paulletang,

Sorry didn't notice comments appeared. Yeah the Manager field is from Entity which is populated by Legal Hold Application. I'll give a try the code snippet you shared with me and post update once I test it.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants