Activities of "ben.shelton"

Hello,

I re-examined my implementation of your suggestion and realized it was not making the associated history log due to us using the bulk calls, InsertManyAsync and DeleteManyAsync, on the repository to add/remove records in the UserAssignedMerchant table.

I was able to modify our existing CustomBulkOperationProvider to address this and now it does make history logs when a record in the UserAssignedMerchant table is created or deleted as we need.

Thanks.

Hi, you can configure the AbpAuditingOptions and define an EntityHistorySelector as below:

            opt.EntityHistorySelectors.Add( 
                new NamedTypeSelector( 
                    "UserAssignedMerchant", 
                    type => typeof(UserAssignedMerchant).IsAssignableFrom(type)  
                    )); 

Hello,

I implemented what you suggested, but I am not seeing a history record being created when I add or remove records from the UserAssignedMerchant table.

For further context:

  • A record in the UserAssignedMerchant table consists of UserId, MerchantId, and TenantId
  • In the User Create and Update methods, we take the list of MerchantIds that are given to be assigned to the user in the respective dtos, then we create a record for each given merchant in the UserAssignedMerchant table if one doesn't already exist. Additionally, we delete records in the UserAssignedMerchant table that represent merchants the user no longer needs to be associated with.

Hello,

I looked over the documentation that you sent and tried using the Audited attribute, but this did not give me what I was looking for.

I am trying to manually add a history log entry to our User entity for changes that are not occurring in the User table. The changes occur on our UserAssignedMerchant join table.

Here is some additional context on our User implementation:

  • We implemented our own User class and dtos, but are using IdentityUserManager calls that we adapted from source code to set the properties to still use the built in AbpUsers table and features in our create and update methods.
  • Also during those methods, we set the entries in the join table with repository calls for the join table.
  • We give the UserAssignedMerchant entries to the end users in a field that is a Guid[] called AssignedMerchantIds, but this only on the dto not the class so it's manually set at the time of retrieval.

Is there a repository call (such as through IAuditLogRepository) that we can make to insert a history log on User that will allow us to manually set what changed in AssignedMerchantIds? Or is there a better way to accomplish this?

Thanks.

  • ABP Framework version: v8.3.0
  • UI Type: MVC
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): no

Hello,

We have our User class that inherits FullAuditedEntity and a join table called UserAssignedMerchant that links the user to an assigned entity since the user can be linked to multiple ones. For context, the UserAssignedMerchant 's class inherits Entity instead of FullAuditedEntity. We would like to be able to show changes to the user's entries in UserAssignedMerchant on the user's audit log history. Is there a way that we can manually make the audit log entry when needed? Is there a better or different way we can accomplish this?

Thanks.

Can you tell me what version of Visual Studio that you are running this in? We are trying to rule that out as a possibility for why it's not working on our end.

The Playwright test is what we are more concerned with since that is what we will be using for our testing and we have not been able to get it to run playwright tests successfully in an abp generated project, only in non-abp projects.

Does the Playwright sample test under AbpPlaywrightTest.TestBase.TestExample run for you?

Hello,

I removed the typeof(Microsoft.Playwright.NUnit.PlaywrightTest) where you advised, but I am still unable to run the tests. It continuously spins on Starting Test discovery.

Hello,

I sent a sample project to your email.

Please let me know if you need anything further from me.

Hello,

I have taken a look at the link you sent, but unfortunately it was not able to help. Would it be possible for you to send a sample abp generated project that has Playwright added and working so I can see how it is implemented?

Showing 1 to 10 of 15 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on May 14, 2025, 07:53