From 719a61817c082e1d6fb8bb52901e8191fd28d194 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 4 Dec 2020 00:31:42 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 45 ++++++---------------------------------- 1 file changed, 6 insertions(+), 39 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 199160f9..ea9307e8 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -17,52 +17,19 @@ todo: if list view not found / deleted when grid list form is opened rather than or I guess on demand is best since it's not eating up bandwidth -todo: deleting customer does it delete all associated data: +todo: deleting customer must attempt to delete the following as they are entered "in" form and not selected externally so they are part of Customer and should delete with it: customer notes customer contacts + notification subscriptions should delete automatically for a User delete since they are the only concerned person + Return proper referential integrity error if can't delete them due to links -todo: deleting HeadOffice does it delete all contacts too? +todo: deleting HeadOffice must attempt to delete all contacts too todo: seeded user names look stupid with the numbers in them, change that so unique is done but without that nonsense -todo: How to handle delete of customer with records?? - Completely seperate process "purge" or extension or something? - mass delete extension maybe, can pick items to delete, i.e. "Delete all workorders for this Customer" +todo: Case 3595 Mass delete extension + Do this early as it will be copied over and over again -todo: delete error with connected records should display a really clear error at the client, right now it just says server internal error and this is at the server: -2020-12-03 14:57:04.6421|ERROR|SERVER|Error=>Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. - ---> Npgsql.PostgresException (0x80004005): 23503: update or delete on table "acustomer" violates foreign key constraint "auser_customerid_fkey" on table "auser" - at Npgsql.NpgsqlConnector.g__ReadMessageLong|194_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) - at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) - at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) - at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) - at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) - at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) - at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) - at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) - Exception data: - Severity: ERROR - SqlState: 23503 - MessageText: update or delete on table "acustomer" violates foreign key constraint "auser_customerid_fkey" on table "auser" - Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. - SchemaName: public - TableName: auser - ConstraintName: auser_customerid_fkey - File: d:\pginstaller_13.auto\postgres.windows-x64\src\backend\utils\adt\ri_triggers.c - Line: 2493 - Routine: ri_ReportViolation - --- End of inner exception stack trace --- - at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) - at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) - at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) - at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) - at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) - at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(DbContext _, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) - at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) - at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) - at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) - at AyaNova.Biz.CustomerBiz.DeleteAsync(Int64 id) in C:\data\code\raven\server\AyaNova\biz\CustomerBiz.cs:line 160 - at AyaNova.Api.Controllers.CustomerController.DeleteCustomer(Int64 id) in C:\data\code\raven\server\AyaNova\Controllers\CustomerController.cs:line 146 ............................................................