From 02d84f957b783608c2f38943bc7722c6e2c28ae2 Mon Sep 17 00:00:00 2001 From: implem-noro Date: Fri, 9 Dec 2022 11:45:04 +0900 Subject: [PATCH] Bug fixed: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・ライブラリNewtonsoft.Jsonのバージョンアップに対応。 ・サイトパッケージにインポート時にKeyNotFoundExceptionが発生する問題を解消。 ・項目の制御を含まない状況による制御が設定されたテーブルで自動ポストバック時にnull参照違反が発生する問題を解消。 --- Implem.CodeDefiner/Implem.CodeDefiner.csproj | 6 +-- .../Implem.DefinitionAccessor.csproj | 6 +-- .../Implem.DisplayAccessor.csproj | 6 +-- Implem.Factory/Implem.Factory.csproj | 6 +-- Implem.Libraries/Implem.Libraries.csproj | 8 +-- .../Implem.ParameterAccessor.csproj | 6 +-- .../Model_SetByApiImages_Body.txt | 2 +- .../Model_SetByApi_ImageHash_Body.txt | 2 +- Implem.Pleasanter/Implem.Pleasanter.csproj | 8 +-- .../Libraries/Settings/SiteSettings.cs | 1 + .../Libraries/SitePackages/Utilities.cs | 50 ++++++++++--------- Implem.Pleasanter/Models/Issues/IssueModel.cs | 4 +- .../Models/Results/ResultModel.cs | 4 +- .../implem.TestAutomation.csproj | 8 +-- Rds/Implem.IRds/Implem.IRds.csproj | 6 +-- .../Implem.PostgreSql.csproj | 6 +-- Rds/Implem.SqlServer/Implem.SqlServer.csproj | 6 +-- 17 files changed, 70 insertions(+), 65 deletions(-) diff --git a/Implem.CodeDefiner/Implem.CodeDefiner.csproj b/Implem.CodeDefiner/Implem.CodeDefiner.csproj index f1f473328..ae54ff4f9 100644 --- a/Implem.CodeDefiner/Implem.CodeDefiner.csproj +++ b/Implem.CodeDefiner/Implem.CodeDefiner.csproj @@ -5,9 +5,9 @@ net6.0 Copyright © Implem Inc 2014 - 2022 This program does the automatic code creation and merging of existing code based on the definition. Also it will make the configuration change of sql server database. - 1.3.26.0 - 1.3.26.0 - 1.3.26.0 + 1.3.26.1 + 1.3.26.1 + 1.3.26.1 Linux diff --git a/Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj b/Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj index 06ca0a44f..96785d2eb 100644 --- a/Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj +++ b/Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj @@ -3,9 +3,9 @@ net6.0 Copyright © Implem Inc 2014 - 2022 - 1.3.26.0 - 1.3.26.0 - 1.3.26.0 + 1.3.26.1 + 1.3.26.1 + 1.3.26.1 disable diff --git a/Implem.DisplayAccessor/Implem.DisplayAccessor.csproj b/Implem.DisplayAccessor/Implem.DisplayAccessor.csproj index 9df5c5b7f..c5c89d4eb 100644 --- a/Implem.DisplayAccessor/Implem.DisplayAccessor.csproj +++ b/Implem.DisplayAccessor/Implem.DisplayAccessor.csproj @@ -3,9 +3,9 @@ net6.0 Copyright © Implem Inc 2014 - 2022 - 1.3.26.0 - 1.3.26.0 - 1.3.26.0 + 1.3.26.1 + 1.3.26.1 + 1.3.26.1 disable diff --git a/Implem.Factory/Implem.Factory.csproj b/Implem.Factory/Implem.Factory.csproj index b30d17622..955ae22ef 100644 --- a/Implem.Factory/Implem.Factory.csproj +++ b/Implem.Factory/Implem.Factory.csproj @@ -3,9 +3,9 @@ net6.0 Copyright © Implem Inc 2014 - 2022 - 1.3.26.0 - 1.3.26.0 - 1.3.26.0 + 1.3.26.1 + 1.3.26.1 + 1.3.26.1 disable diff --git a/Implem.Libraries/Implem.Libraries.csproj b/Implem.Libraries/Implem.Libraries.csproj index 5dc9a2d3c..55225fbf0 100644 --- a/Implem.Libraries/Implem.Libraries.csproj +++ b/Implem.Libraries/Implem.Libraries.csproj @@ -3,16 +3,16 @@ net6.0 Copyright © Implem Inc 2014 - 2022 - 1.3.26.0 - 1.3.26.0 - 1.3.26.0 + 1.3.26.1 + 1.3.26.1 + 1.3.26.1 disable - + diff --git a/Implem.ParameterAccessor/Implem.ParameterAccessor.csproj b/Implem.ParameterAccessor/Implem.ParameterAccessor.csproj index c51c0dd2d..b86ce8cc6 100644 --- a/Implem.ParameterAccessor/Implem.ParameterAccessor.csproj +++ b/Implem.ParameterAccessor/Implem.ParameterAccessor.csproj @@ -3,9 +3,9 @@ net6.0 Copyright © Implem Inc 2014 - 2022 - 1.3.26.0 - 1.3.26.0 - 1.3.26.0 + 1.3.26.1 + 1.3.26.1 + 1.3.26.1 disable diff --git a/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByApiImages_Body.txt b/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByApiImages_Body.txt index c74676d07..e06e45f81 100644 --- a/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByApiImages_Body.txt +++ b/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByApiImages_Body.txt @@ -1,4 +1,4 @@ -public void SetPostedFiles( +public void SetPostedFile( Microsoft.AspNetCore.Http.IFormFile file, string columnName, Shared._ImageApiModel image) diff --git a/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByApi_ImageHash_Body.txt b/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByApi_ImageHash_Body.txt index 3d44c2554..7a8de0bd4 100644 --- a/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByApi_ImageHash_Body.txt +++ b/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByApi_ImageHash_Body.txt @@ -5,7 +5,7 @@ var file = new Microsoft.AspNetCore.Http.FormFile(stream, 0, bytes.Length, null, $"image{o.Value.Extension}"); if (ss.ColumnHash.Get(o.Key).AllowImage == true) { - SetPostedFiles( + SetPostedFile( file: file, columnName: o.Key, image: o.Value); diff --git a/Implem.Pleasanter/Implem.Pleasanter.csproj b/Implem.Pleasanter/Implem.Pleasanter.csproj index a76b5f731..ea1de8913 100644 --- a/Implem.Pleasanter/Implem.Pleasanter.csproj +++ b/Implem.Pleasanter/Implem.Pleasanter.csproj @@ -5,10 +5,10 @@ Copyright © Implem Inc 2014 - 2022 Business application platform Implem.Pleasanter - 1.3.26.0 - 1.3.26.0 + 1.3.26.1 + 1.3.26.1 7.2 - 1.3.26.0 + 1.3.26.1 disable Linux ..\docker-compose.dcproj @@ -61,7 +61,7 @@ NU1701 - + diff --git a/Implem.Pleasanter/Libraries/Settings/SiteSettings.cs b/Implem.Pleasanter/Libraries/Settings/SiteSettings.cs index a6e48f138..16734e192 100644 --- a/Implem.Pleasanter/Libraries/Settings/SiteSettings.cs +++ b/Implem.Pleasanter/Libraries/Settings/SiteSettings.cs @@ -5306,6 +5306,7 @@ public List ReplaceFieldColumns( .Where(o => o.UseSearch == true) .Select(o => o.ColumnName)); columns.AddRange(StatusControls? + .Where(statusControl => statusControl.ColumnHash != null) .SelectMany(statusControl => statusControl.ColumnHash) .Where(o => o.Value != StatusControl.ControlConstraintsTypes.None) .Select(o => o.Key)); diff --git a/Implem.Pleasanter/Libraries/SitePackages/Utilities.cs b/Implem.Pleasanter/Libraries/SitePackages/Utilities.cs index 60c3f4bae..7cab84a17 100644 --- a/Implem.Pleasanter/Libraries/SitePackages/Utilities.cs +++ b/Implem.Pleasanter/Libraries/SitePackages/Utilities.cs @@ -339,33 +339,37 @@ public static string ImportSitePackage( continue; } } - var idConverter = new IdConverter( - context: context, - siteId: packageSiteModel.SavedSiteId, - permissionShortModel: permissionShortModel, - permissionIdList: sitePackage.PermissionIdList, - convertSiteId: idHash[permissionShortModel.ReferenceId]); - var exists = Rds.ExecuteScalar_int( - context: context, - statements: Rds.SelectPermissions( - column: Rds.PermissionsColumn().ReferenceId(), - where: Rds.PermissionsWhere() - .ReferenceId(idHash[permissionShortModel.ReferenceId]) - .DeptId(idConverter.ConvertDeptId) - .GroupId(idConverter.ConvertGroupId) - .UserId(idConverter.ConvertUserId))) > 0; - if (idConverter.Convert == true && !exists) + var referenceId = idHash.Get(permissionShortModel.ReferenceId); + if (referenceId > 0) { - Repository.ExecuteNonQuery( + var idConverter = new IdConverter( + context: context, + siteId: packageSiteModel.SavedSiteId, + permissionShortModel: permissionShortModel, + permissionIdList: sitePackage.PermissionIdList, + convertSiteId: referenceId); + var exists = Rds.ExecuteScalar_int( context: context, - transactional: true, - statements: Rds.InsertPermissions( - param: Rds.PermissionsParam() - .ReferenceId(idHash[permissionShortModel.ReferenceId]) + statements: Rds.SelectPermissions( + column: Rds.PermissionsColumn().ReferenceId(), + where: Rds.PermissionsWhere() + .ReferenceId(referenceId) .DeptId(idConverter.ConvertDeptId) .GroupId(idConverter.ConvertGroupId) - .UserId(idConverter.ConvertUserId) - .PermissionType(permissionShortModel.PermissionType))); + .UserId(idConverter.ConvertUserId))) > 0; + if (idConverter.Convert == true && !exists) + { + Repository.ExecuteNonQuery( + context: context, + transactional: true, + statements: Rds.InsertPermissions( + param: Rds.PermissionsParam() + .ReferenceId(referenceId) + .DeptId(idConverter.ConvertDeptId) + .GroupId(idConverter.ConvertGroupId) + .UserId(idConverter.ConvertUserId) + .PermissionType(permissionShortModel.PermissionType))); + } } } } diff --git a/Implem.Pleasanter/Models/Issues/IssueModel.cs b/Implem.Pleasanter/Models/Issues/IssueModel.cs index 243179b7d..e83870a8b 100644 --- a/Implem.Pleasanter/Models/Issues/IssueModel.cs +++ b/Implem.Pleasanter/Models/Issues/IssueModel.cs @@ -3045,7 +3045,7 @@ public void SetByApi(Context context, SiteSettings ss) var file = new Microsoft.AspNetCore.Http.FormFile(stream, 0, bytes.Length, null, $"image{o.Value.Extension}"); if (ss.ColumnHash.Get(o.Key).AllowImage == true) { - SetPostedFiles( + SetPostedFile( file: file, columnName: o.Key, image: o.Value); @@ -3061,7 +3061,7 @@ public void SetByApi(Context context, SiteSettings ss) SetChoiceHash(context: context, ss: ss); } - public void SetPostedFiles( + public void SetPostedFile( Microsoft.AspNetCore.Http.IFormFile file, string columnName, Shared._ImageApiModel image) diff --git a/Implem.Pleasanter/Models/Results/ResultModel.cs b/Implem.Pleasanter/Models/Results/ResultModel.cs index 06019a123..99d8cd365 100644 --- a/Implem.Pleasanter/Models/Results/ResultModel.cs +++ b/Implem.Pleasanter/Models/Results/ResultModel.cs @@ -2743,7 +2743,7 @@ public void SetByApi(Context context, SiteSettings ss) var file = new Microsoft.AspNetCore.Http.FormFile(stream, 0, bytes.Length, null, $"image{o.Value.Extension}"); if (ss.ColumnHash.Get(o.Key).AllowImage == true) { - SetPostedFiles( + SetPostedFile( file: file, columnName: o.Key, image: o.Value); @@ -2759,7 +2759,7 @@ public void SetByApi(Context context, SiteSettings ss) SetChoiceHash(context: context, ss: ss); } - public void SetPostedFiles( + public void SetPostedFile( Microsoft.AspNetCore.Http.IFormFile file, string columnName, Shared._ImageApiModel image) diff --git a/Implem.TestAutomation/implem.TestAutomation.csproj b/Implem.TestAutomation/implem.TestAutomation.csproj index e6d02376a..ce90211ed 100644 --- a/Implem.TestAutomation/implem.TestAutomation.csproj +++ b/Implem.TestAutomation/implem.TestAutomation.csproj @@ -4,9 +4,9 @@ Exe net6.0 Copyright © Implem Inc 2014 - 2022 - 1.3.26.0 - 1.3.26.0 - 1.3.26.0 + 1.3.26.1 + 1.3.26.1 + 1.3.26.1 Linux @@ -24,7 +24,7 @@ - + diff --git a/Rds/Implem.IRds/Implem.IRds.csproj b/Rds/Implem.IRds/Implem.IRds.csproj index 9df5c5b7f..c5c89d4eb 100644 --- a/Rds/Implem.IRds/Implem.IRds.csproj +++ b/Rds/Implem.IRds/Implem.IRds.csproj @@ -3,9 +3,9 @@ net6.0 Copyright © Implem Inc 2014 - 2022 - 1.3.26.0 - 1.3.26.0 - 1.3.26.0 + 1.3.26.1 + 1.3.26.1 + 1.3.26.1 disable diff --git a/Rds/Implem.PostgreSql/Implem.PostgreSql.csproj b/Rds/Implem.PostgreSql/Implem.PostgreSql.csproj index 911f16192..c6c11a832 100644 --- a/Rds/Implem.PostgreSql/Implem.PostgreSql.csproj +++ b/Rds/Implem.PostgreSql/Implem.PostgreSql.csproj @@ -3,9 +3,9 @@ net6.0 Copyright © Implem Inc 2014 - 2022 - 1.3.26.0 - 1.3.26.0 - 1.3.26.0 + 1.3.26.1 + 1.3.26.1 + 1.3.26.1 disable diff --git a/Rds/Implem.SqlServer/Implem.SqlServer.csproj b/Rds/Implem.SqlServer/Implem.SqlServer.csproj index 87d21865d..26a88d1ab 100644 --- a/Rds/Implem.SqlServer/Implem.SqlServer.csproj +++ b/Rds/Implem.SqlServer/Implem.SqlServer.csproj @@ -3,9 +3,9 @@ net6.0 Copyright © Implem Inc 2014 - 2022 - 1.3.26.0 - 1.3.26.0 - 1.3.26.0 + 1.3.26.1 + 1.3.26.1 + 1.3.26.1 disable