add audit to records #24#28
Conversation
There was a problem hiding this comment.
To fix the test I think you may have to persist the user that's being created during the setup.
Like self::getContainer()->get(EntityManagerInterface::class)->persist($this->user);
I'm not sure tho, it's still using the crappy traits to create the user instead of a foundry factory.
EDIT: the trait uses CreateUserService which should call the repository->save on the user, which should call entitymanager->persist, so I have no idea why the tests are whining about it not being persisted..
|
|
||
| public function getNameForAudit(): string | ||
| { | ||
| return $this->getText(); |
There was a problem hiding this comment.
Hm, I'm actually not sure about this.
In real units, the text is very often left blank, or in other cases, the text is being used to include like a "citation" or something, which are often very long which would totally break the table.
I think it's best to remove this function from the trait, and have each record implement the function itself. Then for:
- award records we could show the award text,
- qualification records the qualifications,
- rank records the rank,
- combat records and service records we can grab the text, but we should limit it to max 32 characters.
My apologies for misguiding you in the issue.
No description provided.