Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Selection checkboxes shown when command doesn't require it 2024.4 #2639

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
7f0004f
DEV: Bump vite from 5.2.7 to 5.2.8 in /frontend-html (#2591)
dependabot[bot] Apr 4, 2024
591077f
DEV: Bump @babel/preset-env from 7.24.3 to 7.24.4 in /frontend-html (…
dependabot[bot] Apr 4, 2024
755e822
DEV: Architect's upgrade code for 2024.5
washibana Apr 4, 2024
e68d174
Merge branch 'master' of https://github.com/origam/origam
washibana Apr 4, 2024
42ddc1f
BUILD: 2024.4.0 initialization
washibana Apr 4, 2024
387518f
BUILD: 2024.4.1 initialization
washibana Apr 4, 2024
06b550c
BUILD: 2024.5 initialization
washibana Apr 4, 2024
f9056a9
FEATURE: Default action is executed after enter press if no update wa…
JindrichSusen Apr 5, 2024
58ff1f5
DEV: Bump sass from 1.72.0 to 1.74.1 in /frontend-html (#2600)
dependabot[bot] Apr 9, 2024
05b4762
DEV: Bump string-strip-html from 13.4.7 to 13.4.8 in /frontend-html (…
dependabot[bot] Apr 9, 2024
6b11839
DEV: Bump @testing-library/react from 14.2.2 to 14.3.0 in /frontend-h…
dependabot[bot] Apr 9, 2024
ce5e5b7
DEV: Bump typescript from 5.4.3 to 5.4.4 in /frontend-html (#2602)
dependabot[bot] Apr 9, 2024
4673893
BUILD: 2024.2.3 initialization.
washibana Apr 10, 2024
18ffefd
BUILD: 2024.3.2 initialization.
washibana Apr 11, 2024
5890935
DEV: NewRecordScreenBindingParameterMapping - improved description wo…
washibana Apr 11, 2024
e2e82cd
DEV: Bump typescript from 5.4.4 to 5.4.5 in /frontend-html (#2606)
dependabot[bot] Apr 12, 2024
af17571
DEV: Bump @testing-library/react from 14.3.0 to 15.0.1 in /frontend-h…
dependabot[bot] Apr 12, 2024
1a526c5
DEV: Bump @types/react-virtualized in /frontend-html (#2607)
dependabot[bot] Apr 12, 2024
5941745
FEATURE: WorkflowCancelledByUserException removed from logging. (#2608)
washibana Apr 15, 2024
75601f5
DEV: Bump sass from 1.74.1 to 1.75.0 in /frontend-html (#2611)
dependabot[bot] Apr 15, 2024
e2ffc04
DEV: model-tests All Data Types read only screen. (#2613)
washibana Apr 15, 2024
75bd4fc
FIX: Form reference menu item without screen spawned NPEs. (#2612)
washibana Apr 15, 2024
9775fb2
FIX: DataStructureRule - NPE when accessing entity name while entity …
washibana Apr 16, 2024
b88c958
UX: Add Cmd key tooltip translations and fix cursor behavior when use…
pilpadav Apr 16, 2024
417a83d
DEV: Bump vite from 5.2.8 to 5.2.9 in /frontend-html (#2618)
dependabot[bot] Apr 17, 2024
063720a
DEV: Bump @testing-library/react from 15.0.1 to 15.0.2 in /frontend-h…
dependabot[bot] Apr 17, 2024
43a655a
FIX: Rules weren't processed for lookup new record initial values. (#…
washibana Apr 18, 2024
74f2fd2
FIX: Dropdown shows after double clicking a read-only lookup (#2621)
pilpadav Apr 18, 2024
9d54204
DEV: Integration test for closing report window (#2610)
pilpadav Apr 18, 2024
7ee7ae3
FIX: Modal dialog buttons propagation (#2619)
pilpadav Apr 18, 2024
9e6562c
FIX: Merge failed with no row at position 0 when deleting entity. (#2…
washibana Apr 19, 2024
4c6546d
DEV: File-scoped namespaces. (#2625)
washibana Apr 22, 2024
902fa50
DEV: Bump vite from 5.2.9 to 5.2.10 in /frontend-html (#2626)
dependabot[bot] Apr 23, 2024
397881b
FIX: Show Record Information not updated with arrows (#2622)
pilpadav Apr 23, 2024
7ef1b21
DEV: Bump @testing-library/react from 15.0.2 to 15.0.4 in /frontend-h…
dependabot[bot] Apr 24, 2024
861318a
FIX: Record not saved error on lazy loaded screen (#2629)
JindrichSusen Apr 24, 2024
f25481d
DEV: Revert file-scoped namespaces (#2625). (#2633)
washibana Apr 24, 2024
fe998d1
FIX: Focus was sometimes not set to the active editor after changing …
JindrichSusen Apr 24, 2024
f742cd6
DEV: Bump browserslist-useragent-regexp in /frontend-html (#2637)
dependabot[bot] Apr 25, 2024
2ea16fc
FIX: Focus not moved to previous cell after pressing shift+tab while …
pilpadav Apr 25, 2024
203b82f
Fix selection boxes showing up when no action has MultipleCheckboxes …
pilpadav Apr 26, 2024
59e85e7
Add check for command class type
pilpadav Apr 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions backend/Origam.DA.Service/DatasetTools.cs
Expand Up @@ -384,7 +384,6 @@ private static string ConvertValueToString(object value)
int iCol;
DataRow drSource, drTarget;
int nbRowSource = in_dtSource.Rows.Count;// optim
int nbRowTarget = inout_dtTarget.Rows.Count;// optim
int nbCol = in_dtSource.Columns.Count;// optim
bool bDoIt;
bool bRowModified;
Expand Down Expand Up @@ -636,7 +635,7 @@ private static string ConvertValueToString(object value)
adcPK = in_dtSource.PrimaryKey;
aRowKey = new object[adcPK.Length];
ArrayList rowsToDelete = new ArrayList();

int nbRowTarget = inout_dtTarget.Rows.Count;
for (int iRowTarget = 0 ; nbRowTarget > iRowTarget ; ++iRowTarget)
{
drTarget = inout_dtTarget.Rows[iRowTarget];
Expand Down
2 changes: 1 addition & 1 deletion backend/Origam.Gui.Win/Workflow/WorkflowForm.cs
Expand Up @@ -143,7 +143,7 @@ public void FinishTask()
{
if(this.EndRule != null)
{
this.WorkflowEngine.EvaluateEndRule(this.EndRule, this.NextData);
this.WorkflowEngine.EvaluateEndRule(this.EndRule, this.NextData, null);
}
}
catch(RuleException ruleEx)
Expand Down
33 changes: 22 additions & 11 deletions backend/Origam.OrigamEngine/ModelXmlBuilders/FormXmlBuilder.cs
Expand Up @@ -307,22 +307,35 @@ public static XmlDocument GetXml(WorkQueueClass wqc, DataSet dataset, string nam
Hashtable dataSources = new Hashtable();
OrigamSettings settings = ConfigurationManager.GetActiveConfiguration();
DataTable table = dataset.Tables["WorkQueueEntry"];
var parameterService = ServiceManager.Services.GetService<IParameterService>();

QueryParameterCollection pms = new QueryParameterCollection();
QueryParameterCollection pms = new QueryParameterCollection();
pms.Add(new QueryParameter("WorkQueueCommand_parWorkQueueId", queueId));
DataSet commands = core.DataService.Instance.LoadData(new Guid("1d33b667-ca76-4aaa-a47d-0e404ed6f8a6"), new Guid("421aec03-1eec-43f9-b0bb-17cfc24510a0"), Guid.Empty, Guid.Empty, null, pms);

ArrayList commandRows = new ArrayList();
var commandRows = new List<DataRow>();
IOrigamAuthorizationProvider auth = SecurityManager.GetAuthorizationProvider();
foreach (DataRow cmdRow in commands.Tables["WorkQueueCommand"].Rows)
{
if (cmdRow.IsNull("Roles") || !auth.Authorize(SecurityManager.CurrentPrincipal, (string)cmdRow["Roles"]))
foreach (DataRow cmdRow in commands.Tables["WorkQueueCommand"].Rows)
{
if (cmdRow.IsNull("Roles") || !auth.Authorize(SecurityManager.CurrentPrincipal, (string)cmdRow["Roles"]))
{
continue;
}
commandRows.Add(cmdRow);
}

bool showCheckboxes = commandRows.Any(cmdRow =>
{
if ((Guid)cmdRow["refWorkQueueCommandTypeId"] == (Guid)parameterService.GetParameterValue("WorkQueueCommandType_WorkQueueClassCommand"))
{
continue;
WorkQueueWorkflowCommand cmd = wqc.GetCommand((string)cmdRow["Command"]);
return cmd.Mode == PanelActionMode.MultipleCheckboxes;
}
commandRows.Add(cmdRow);
}
bool showCheckboxes = commandRows.Count > 0;
else
{
return true;
}
});

// Window
XmlDocument doc = GetWindowBaseXml(
Expand Down Expand Up @@ -460,8 +473,6 @@ public static XmlDocument GetXml(WorkQueueClass wqc, DataSet dataset, string nam
CreateComponentBinding(doc, bindingsElement, queueId.ToString(), "Id", "WorkQueueEntry", "65DF44F9-C050-4554-AD9A-896445314279", "Id", "WorkQueueEntry", false);
}

IParameterService parameterService = ServiceManager.Services.GetService(typeof(IParameterService)) as IParameterService;

foreach(DataRow cmdRow in commandRows)
{
Hashtable cmdParams = new Hashtable();
Expand Down
Expand Up @@ -62,17 +62,7 @@ public int Priority

private string entityName;

public String EntityName
{
get
{
if (entityName == null)
{
entityName = Entity.Name;
}
return entityName;
}
}
public string EntityName => entityName ??= Entity?.Name;

[TypeConverter(typeof(DataQueryEntityConverter))]
[RefreshProperties(RefreshProperties.Repaint)]
Expand Down
Expand Up @@ -59,7 +59,7 @@ public NewRecordScreenBindingParameterMapping(Key primaryKey)
[Category("Data")]
[NotNullModelElementRule]
[XmlAttribute("parameterName")]
[Description("Parameter used in (added to) the list data structure of the lookup. The reference source column will be set in the properties of the screen section combo box where the lookup is used. If the actual text content of the lookup field should be copied, the value should be set to SearchText.")]
[Description("Parameter used in (added to) the list data structure of the lookup. The referenced source column will be set in the properties of the screen section combo box where the lookup is used. If the actual text content of the lookup field should be copied, the value should be set to SearchText.")]
public string ParameterName { get; set; }

[Category("Data")]
Expand Down
Expand Up @@ -40,23 +40,23 @@ public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
return true;
}

public override System.ComponentModel.TypeConverter.StandardValuesCollection
public override StandardValuesCollection
GetStandardValues(ITypeDescriptorContext context)
{
FormReferenceMenuItem currentItem = context.Instance as FormReferenceMenuItem;
ArrayList methods = currentItem.Screen.DataStructure.Methods;

ArrayList array = new ArrayList(methods.Count);
foreach(AbstractSchemaItem item in methods)
var currentItem = context.Instance as FormReferenceMenuItem;
ArrayList methods = currentItem?.Screen?.DataStructure?.Methods;
if (methods == null)
{
array.Add(item);
return new StandardValuesCollection(new ArrayList());
}

array.Add(null);

array.Sort();

return new StandardValuesCollection(array);
var output = new ArrayList(methods.Count);
foreach (AbstractSchemaItem method in methods)
{
output.Add(method);
}
output.Add(null);
output.Sort();
return new StandardValuesCollection(output);
}

public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
Expand Down
20 changes: 16 additions & 4 deletions backend/Origam.Server/Session Stores/NewRecordSessionStore.cs
Expand Up @@ -22,6 +22,7 @@
using System;
using System.Data;
using System.Globalization;
using System.Linq;
using Origam.DA;
using Origam.Extensions;
using Origam.Schema.EntityModel;
Expand Down Expand Up @@ -63,20 +64,31 @@ var rootEntity
DatasetTools.ApplyPrimaryKey(row);
DatasetTools.UpdateOrigamSystemColumns(
row, true, SecurityManager.CurrentUserProfile().Id);
FillInitialValues(row);
dataSet.RemoveNullConstraints();
table.Rows.Add(row);
SetDataSource(dataSet);
FillInitialValues(row);
}

private void FillInitialValues(DataRow row)
{
foreach (string columnName in Request.NewRecordInitialValues.Keys)
try
{
if (Request.NewRecordInitialValues[columnName] != null)
RegisterEvents();
// we're sorting column names in order to introduce
// a level of predictability in the order of rule processing
var sortedColumnNames = Request.NewRecordInitialValues.Keys.ToList<string>();
sortedColumnNames.Sort();
foreach (var columnName in sortedColumnNames
.Where(columnName
=> Request.NewRecordInitialValues[columnName] != null))
{
row[columnName] = Request.NewRecordInitialValues[columnName];
row[columnName] = Request.NewRecordInitialValues[columnName]!;
}
}
finally
{
UnregisterEvents();
}
}
}