Skip to content

Commit

Permalink
## Added new features / Bug fixed
Browse files Browse the repository at this point in the history
・ユーザ、組織、グループ、システムログの管理画面のパンくずリストにフィルタ付きURLコピーボタンを追加。
・PostgreSQLで "Items"."FullText" のインデックスが生成されていない問題を解消。
・リマインダー機能がエラーにより停止する問題を解消。
・プロセスの「条件」で「管理者」「担当者」「状況」の条件を「未設定」とした場合に正常に動作しない問題を解消。
・プロセスの一括更新を行った際にレコードの履歴が保存されない問題を解消。
・「プロセス」「状況による制御」の設定一覧で「上」「下」ボタンを押すと「状況」欄がクリアされる問題を解消。
・バックグラウンドサーバスクリプトでスクリプト登録時にアプリケーションエラーとなる場合がある問題を解消。
・バックグラウンドサーバスクリプトのスケジュール編集画面で「期間種別」を変更するとJavascriptエラーとなる問題を解消。
・親->子->孫構成のテーブルで孫への経路が複数あった場合、一覧表示できる経路が1つしか選択できない問題を解消。
・項目連携を設定した子項目のデータ件数が多い場合、編集画面表示時に子項目の値がクリアされる問題を解消。
・添付ファイル取得APIのレスポンスに含まれる日付のフォーマットが他のAPIと異なる問題を解消。
・読み取り専用のレコードで編集画面のレイアウトが崩れる問題を解消。
・設定ダイアログがパンくずリストのバーの下に隠れてしまう問題を解消。
  • Loading branch information
pierre3 committed Aug 6, 2024
1 parent cef0e8e commit 58ead2f
Show file tree
Hide file tree
Showing 72 changed files with 915 additions and 606 deletions.
38 changes: 25 additions & 13 deletions Implem.CodeDefiner/Functions/Rds/Parts/Indexes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,31 @@ internal static bool HasChanges(
string sourceTableName,
Sqls.TableTypes tableType)
{
return !Parameters.Rds.DisableIndexChangeDetection
&& IndexInfoCollection(
factory: factory,
generalTableName: generalTableName,
sourceTableName: sourceTableName,
tableType: tableType)
.Select(o => o.IndexName())
.Distinct()
.OrderBy(o => o)
.Join(",") != Get(
factory: factory,
sourceTableName: sourceTableName)
.Join(",");
if (Parameters.Rds.DisableIndexChangeDetection)
{
return false;
}
var defIndexInfoCollection = IndexInfoCollection(
factory: factory,
generalTableName: generalTableName,
sourceTableName: sourceTableName,
tableType: tableType)
.Select(o => o.IndexName())
.Distinct()
.OrderBy(o => o);
var dbIndexColumnCollection = Get(
factory: factory,
sourceTableName: sourceTableName);
if (Parameters.Rds.Dbms == "PostgreSQL")
{
dbIndexColumnCollection = dbIndexColumnCollection.Where(o => !Check_FullTextIndex(o));
}
return defIndexInfoCollection.Join(",") != dbIndexColumnCollection.Join(",");
}

private static bool Check_FullTextIndex(string indexName)
{
return indexName == "ftx";
}

private static string Sql_CreateIx(
Expand Down
71 changes: 49 additions & 22 deletions Implem.CodeDefiner/Functions/Rds/TablesConfigurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,38 +34,65 @@ internal static void Configure(ISqlObjectFactory factory)
switch (Parameters.Rds.Dbms)
{
case "SQLServer":
ConfigureFullTextIndex(factory: factory);
ConfigureFullTextIndexSqlServer(factory: factory);
break;
case "PostgreSQL":
ConfigureFullTextIndexPostgreSql(factory: factory);
break;
}
}
catch (System.Data.SqlClient.SqlException e)
{
Consoles.Write($"[{e.Number}] {e.Message}", Consoles.Types.Error);
}
catch (System.Exception e)
{
Consoles.Write($"[{nameof(ConfigureFullTextIndex)}]: {e}", Consoles.Types.Error);
Consoles.Write($"{e.Message}", Consoles.Types.Error);
}
}

private static void ConfigureFullTextIndex(ISqlObjectFactory factory)
private static void ConfigureFullTextIndexSqlServer(ISqlObjectFactory factory)
{
var pkItems = Def.SqlIoByAdmin(
factory: factory,
statements: new SqlStatement(Def.Sql.SelectPkName.Replace("#TableName#", "Items")))
.ExecuteScalar_string(factory: factory, dbTransaction: null, dbConnection: null);
var pkBinaries = Def.SqlIoByAdmin(
factory: factory,
statements: new SqlStatement(Def.Sql.SelectPkName.Replace("#TableName#", "Binaries")))
.ExecuteScalar_string(factory: factory, dbTransaction: null, dbConnection: null);
Def.SqlIoBySa(factory: factory, initialCatalog: Environments.ServiceName)
.ExecuteNonQuery(
try
{
var pkItems = Def.SqlIoByAdmin(
factory: factory,
statements: new SqlStatement(Def.Sql.SelectPkName.Replace("#TableName#", "Items")))
.ExecuteScalar_string(factory: factory, dbTransaction: null, dbConnection: null);
var pkBinaries = Def.SqlIoByAdmin(
factory: factory,
dbTransaction: null,
dbConnection: null,
commandText: Def.Sql.CreateFullText
.Replace("#PKItems#", pkItems)
.Replace("#PKBinaries#", pkBinaries));
statements: new SqlStatement(Def.Sql.SelectPkName.Replace("#TableName#", "Binaries")))
.ExecuteScalar_string(factory: factory, dbTransaction: null, dbConnection: null);
Def.SqlIoBySa(factory: factory, initialCatalog: Environments.ServiceName)
.ExecuteNonQuery(
factory: factory,
dbTransaction: null,
dbConnection: null,
commandText: Def.Sql.CreateFullText
.Replace("#PKItems#", pkItems)
.Replace("#PKBinaries#", pkBinaries));
}
catch (System.Data.SqlClient.SqlException e)
{
Consoles.Write($"[{e.Number}] [{nameof(ConfigureFullTextIndexSqlServer)}]: {e}", Consoles.Types.Error);
}
}

private static void ConfigureFullTextIndexPostgreSql(ISqlObjectFactory factory)
{
try
{
if (!factory.SqlDefinitionSetting.IsCreatingDb)
{
return;
}
Def.SqlIoByAdmin(factory: factory)
.ExecuteNonQuery(
factory: factory,
dbTransaction: null,
dbConnection: null,
commandText: Def.Sql.CreateFullText);
}
catch (System.Data.SqlClient.SqlException e)
{
Consoles.Write($"[{e.Number}] [{nameof(ConfigureFullTextIndexPostgreSql)}]: {e}", Consoles.Types.Error);
}
}

private static void ConfigureTableSet(ISqlObjectFactory factory, string generalTableName)
Expand Down
8 changes: 4 additions & 4 deletions Implem.CodeDefiner/Implem.CodeDefiner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<TargetFramework>net8.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2024</Copyright>
<Description>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.</Description>
<AssemblyVersion>1.4.6.4</AssemblyVersion>
<FileVersion>1.4.6.4</FileVersion>
<Version>1.4.6.4</Version>
<AssemblyVersion>1.4.7.0</AssemblyVersion>
<FileVersion>1.4.7.0</FileVersion>
<Version>1.4.7.0</Version>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions Implem.DefinitionAccessor/Def.cs
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ public static void SetCodeDefinition()
case "Model_Matched": Code.Model_Matched = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_Matched, definitionRow, CodeXls); break;
case "Model_Matched_ColumnCases": Code.Model_Matched_ColumnCases = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_Matched_ColumnCases, definitionRow, CodeXls); break;
case "Model_Matched_ColumnCases_Context": Code.Model_Matched_ColumnCases_Context = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_Matched_ColumnCases_Context, definitionRow, CodeXls); break;
case "Model_Matched_ColumnCases_User": Code.Model_Matched_ColumnCases_User = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_Matched_ColumnCases_User, definitionRow, CodeXls); break;
case "Model_Matched_Incomplete": Code.Model_Matched_Incomplete = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_Matched_Incomplete, definitionRow, CodeXls); break;
case "Model_Matched_Issues": Code.Model_Matched_Issues = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_Matched_Issues, definitionRow, CodeXls); break;
case "Model_Matched_NullCondition": Code.Model_Matched_NullCondition = definitionRow[1].ToString().NoSpace(definitionRow["NoSpace"].ToBool()); SetCodeTable(CodeTable.Model_Matched_NullCondition, definitionRow, CodeXls); break;
Expand Down Expand Up @@ -7035,6 +7036,7 @@ public class CodeColumn2nd
public string Model_Matched;
public string Model_Matched_ColumnCases;
public string Model_Matched_ColumnCases_Context;
public string Model_Matched_ColumnCases_User;
public string Model_Matched_Incomplete;
public string Model_Matched_Issues;
public string Model_Matched_NullCondition;
Expand Down Expand Up @@ -7879,6 +7881,7 @@ public class CodeTable
public CodeDefinition Model_Matched = new CodeDefinition();
public CodeDefinition Model_Matched_ColumnCases = new CodeDefinition();
public CodeDefinition Model_Matched_ColumnCases_Context = new CodeDefinition();
public CodeDefinition Model_Matched_ColumnCases_User = new CodeDefinition();
public CodeDefinition Model_Matched_Incomplete = new CodeDefinition();
public CodeDefinition Model_Matched_Issues = new CodeDefinition();
public CodeDefinition Model_Matched_NullCondition = new CodeDefinition();
Expand Down
6 changes: 3 additions & 3 deletions Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2024</Copyright>
<AssemblyVersion>1.4.6.4</AssemblyVersion>
<FileVersion>1.4.6.4</FileVersion>
<Version>1.4.6.4</Version>
<AssemblyVersion>1.4.7.0</AssemblyVersion>
<FileVersion>1.4.7.0</FileVersion>
<Version>1.4.7.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.DisplayAccessor/Implem.DisplayAccessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2024</Copyright>
<AssemblyVersion>1.4.6.4</AssemblyVersion>
<FileVersion>1.4.6.4</FileVersion>
<Version>1.4.6.4</Version>
<AssemblyVersion>1.4.7.0</AssemblyVersion>
<FileVersion>1.4.7.0</FileVersion>
<Version>1.4.7.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.Factory/Implem.Factory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2024</Copyright>
<AssemblyVersion>1.4.6.4</AssemblyVersion>
<FileVersion>1.4.6.4</FileVersion>
<Version>1.4.6.4</Version>
<AssemblyVersion>1.4.7.0</AssemblyVersion>
<FileVersion>1.4.7.0</FileVersion>
<Version>1.4.7.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.Libraries/Implem.Libraries.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2024</Copyright>
<AssemblyVersion>1.4.6.4</AssemblyVersion>
<FileVersion>1.4.6.4</FileVersion>
<Version>1.4.6.4</Version>
<AssemblyVersion>1.4.7.0</AssemblyVersion>
<FileVersion>1.4.7.0</FileVersion>
<Version>1.4.7.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.ParameterAccessor/Implem.ParameterAccessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2024</Copyright>
<AssemblyVersion>1.4.6.4</AssemblyVersion>
<FileVersion>1.4.6.4</FileVersion>
<Version>1.4.6.4</Version>
<AssemblyVersion>1.4.7.0</AssemblyVersion>
<FileVersion>1.4.7.0</FileVersion>
<Version>1.4.7.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
9 changes: 2 additions & 7 deletions Implem.ParameterAccessor/Parts/BackgroundService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public class BackgroundService
{
public List<string> EnvironmentVariables;
public bool Reminder;
public int ReminderIgnoreConsecutiveExceptionCount;
public bool SyncByLdap;
public List<string> SyncByLdapTime;
public bool DeleteSysLogs;
Expand All @@ -24,12 +23,8 @@ public bool TimerEnabled(string deploymentEnvironment)
&& (SyncByLdap
|| DeleteSysLogs
|| DeleteTemporaryFiles
|| DeleteTrashBox);
}

public bool ReminderEnabled(string deploymentEnvironment)
{
return Reminder && ServiceEnabled(deploymentEnvironment);
|| DeleteTrashBox
|| Reminder);
}

private bool ServiceEnabled(string deploymentEnvironment)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{

<!--Model_Matched_ColumnCases-->
<!--Model_Matched_ColumnCases_User-->

default:
switch (Def.ExtendedColumnTypes.Get(filter.Key ?? string.Empty))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"RepeatType": "Column",
"Indent": "6",
"Separator": "\\r\\n",
"FilterColumn": "1"
"FilterColumn": "1",
"Exclude": "Owner,Manager"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Id": "Model_Matched_ColumnCases_User",
"RepeatType": "Column",
"Indent": "6",
"Separator": "\\r\\n",
"Include": "Owner,Manager"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
case "#ColumnName#":
if (#ColumnName##RecordingData# == 0 && filter.Value == "[\"\\t\"]")
{
match = true;
} else
{
match = #ColumnName##RecordingData#.Matched(
context: context,
column: column,
condition: filter.Value);
}
break;
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
context: context,
ss: ss,
process: process);
#modelName#Model.VerUp = Versions.MustVerUp(
context: context,
ss: ss,
baseModel: #modelName#Model);
var errorData = #modelName#Model.Update(
context: context,
ss: ss,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,17 @@ private static HtmlBuilder FieldSetGeneral(
bool editInDialog = false)
{
var mine = #modelName#Model.Mine(context: context);
return hb.FieldSet(id: "FieldSetGeneral", action: () => hb
.FieldSetGeneralColumns(
context: context,
ss: ss,
#modelName#Model: #modelName#Model,
dataSet: dataSet,
links: links,
editInDialog: editInDialog));
return hb.FieldSet(
id: "FieldSetGeneral",
action: () => hb.Div(
css: "fieldset-inner",
action: () => hb.FieldSetGeneralColumns(
context: context,
ss: ss,
#modelName#Model: #modelName#Model,
dataSet: dataSet,
links: links,
editInDialog: editInDialog)));
}

public static HtmlBuilder FieldSetGeneralColumns(
Expand Down Expand Up @@ -525,17 +528,19 @@ private static HtmlBuilder FieldSetTabs(
hb.FieldSet(
id: $"FieldSetTab{data.tab.Id}",
css: " fieldset cf ui-tabs-panel ui-corner-bottom ui-widget-content ",
action: () => hb.Fields(
context: context,
ss: ss,
id: id,
tab: data.tab,
dataSet: dataSet,
links: links,
preview: preview,
editInDialog: editInDialog,
#modelName#Model: #modelName#Model,
tabIndex: data.index));
action: () => hb.Div(
css: "fieldset-inner",
action: () => hb.Fields(
context: context,
ss: ss,
id: id,
tab: data.tab,
dataSet: dataSet,
links: links,
preview: preview,
editInDialog: editInDialog,
#modelName#Model: #modelName#Model,
tabIndex: data.index)));
});
return hb;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,14 @@ private static HtmlBuilder FieldSetGeneral(
SiteSettings ss,
#ModelName#Model #modelName#Model)
{
return hb.FieldSet(id: "FieldSetGeneral", action: () => hb
.FieldSetGeneralColumns(
context: context, ss: ss, #modelName#Model: #modelName#Model));
return hb.FieldSet(
id: "FieldSetGeneral",
action: () => hb.Div(
css: "fieldset-inner",
action: () => hb.FieldSetGeneralColumns(
context: context,
ss: ss,
#modelName#Model: #modelName#Model)));
}

private static HtmlBuilder FieldSetGeneralColumns(
Expand Down
Loading

0 comments on commit 58ead2f

Please sign in to comment.