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

Issue 1020 #1055

Merged
merged 26 commits into from
Aug 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
afb4359
feat: Add comments on a rule #997 (#1001)
CamillePMyddleware Apr 24, 2023
2e8112d
feat: add redirect to the rule detail view after rule creation #998 (…
CamillePMyddleware Apr 27, 2023
1c371df
Large merge flux (#1006)
AlexMyddleware Apr 27, 2023
873e296
feat: working export csv
AlexMyddleware Apr 27, 2023
62253ec
feat: working comment document
AlexMyddleware Apr 27, 2023
b61afe9
feat: working log
AlexMyddleware Apr 27, 2023
e9af754
Change version
Myddleware Apr 28, 2023
b43a69c
fix: remove log statements
AlexMyddleware May 2, 2023
0ef4bcc
feat: remove button plus
AlexMyddleware May 2, 2023
bb0074b
feat: remove search button
AlexMyddleware May 2, 2023
6463b49
feat: change color scheme buttons
AlexMyddleware May 2, 2023
4a39073
feat: edit button and doc buttons
AlexMyddleware May 2, 2023
cbf4b33
Release 3.3.1e (#1018)
Myddleware May 12, 2023
6c63cec
Merge branch 'main' into release-3.3.3-copy
Myddleware May 12, 2023
2fbe04a
Update composer lock
Myddleware May 12, 2023
d780e11
Bugfix : where condition for a LEFT OUTER JOIN
Myddleware May 12, 2023
0fd5d8f
Moodle : manage error for module that returns no message
Myddleware May 17, 2023
1c84c63
Manage error message on the job header after a massaction command
Myddleware May 18, 2023
2b24517
fix: documents of a rule link
AlexMyddleware May 24, 2023
6fd6939
feat: add CreatedBy for rule audit
AlexMyddleware May 24, 2023
acdf2ff
fix: edit-rule-fields-id
AlexMyddleware May 24, 2023
75960e9
Manage log on synchro command
Myddleware May 24, 2023
1c921db
Merge branch 'release-3.3.3-copy' of https://github.com/Myddleware/my…
Myddleware May 24, 2023
d2b05fe
fix: redirection button on/off (#1024)
CamillePMyddleware May 25, 2023
b091a0a
feat: js for removing parenthesis, fixture
AlexMyddleware May 29, 2023
0c78311
Merge branch 'release-3.3.4' into issue-1020
Myddleware Aug 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: js for removing parenthesis, fixture
AlexMyddleware committed May 29, 2023
commit b091a0a9e61cf43159e296c5234e267209b60234
4 changes: 4 additions & 0 deletions assets/js/regle.js
Original file line number Diff line number Diff line change
@@ -268,6 +268,10 @@ $(function () {
var position = $("#area_insert").getCursorPosition();
var content = $('#area_insert').val();
var newContent = content.substr(0, position) + $.trim($(this).text()) + '( ' + content.substr(position);
// If we click on the function mdw_do_not_send_field, we don't want to add the parenthesis because it is a constant
if (newContent == "mdw_do_not_send_field( ") {
newContent = "\"mdw_do_not_send_field\"";
}
$('#area_insert').val(newContent);
colorationSyntax();
theme(style_template);
7 changes: 6 additions & 1 deletion src/Controller/DefaultController.php
Original file line number Diff line number Diff line change
@@ -1418,7 +1418,12 @@ public function ruleSimulation(Request $request): Response
if ('before' == $k) {
$before[] = $v;
} else {
$after[] = $v;
foreach ($v as $key => $value) {
// if value does not contains the substring "mdw_do_not_send_field"
if (strpos($value, 'mdw_do_not_send_field') === false) {
$after[] = $v;
}
}
}
}
}
1 change: 1 addition & 0 deletions src/DataFixtures/LoadFunctionData.php
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ class LoadFunctionData implements FixtureInterface
'mathematical' => ['round', 'ceil', 'abs'],
'text' => ['trim', 'ltrim', 'rtrim', 'lower', 'upper', 'substr', 'striptags', 'changeValue', 'htmlEntityDecode', 'replace', 'utf8encode', 'utf8decode', 'htmlentities', 'htmlspecialchars', 'strlen', 'urlencode', 'chr', 'json_decode', 'json_encode', 'getValueFromArray'],
'date' => ['date', 'microtime', 'changeTimeZone', 'changeFormatDate'],
'constant' => ['mdw_do_not_send_field'],
];

protected $functionCats = [];
12 changes: 12 additions & 0 deletions src/Manager/DocumentManager.php
Original file line number Diff line number Diff line change
@@ -100,6 +100,7 @@ class documentcore
'Error_sending' => 'Error',
'Not_found' => 'Error',
];
private array $notSentFields = [];

// Instanciation de la classe de génération de log Symfony
public function __construct(
@@ -1251,6 +1252,13 @@ protected function insertDataTable($data, $type): bool
) {
continue;
}
// foreach field of $this->notSentFields, we remove it from the data to send
if (
!empty($this->notSentFields)
and in_array($ruleField['target_field_name'], $this->notSentFields)
) {
continue;
}
$dataInsert[$ruleField['target_field_name']] = $data[$ruleField['target_field_name']];
}
}
@@ -1317,6 +1325,10 @@ protected function updateTargetTable(): bool
throw new \Exception('Failed to transform the field '.$ruleField['target_field_name'].'.');
}
$targetField[$ruleField['target_field_name']] = $value;
if ($value === "mdw_do_not_send_field") {
unset($targetField[$ruleField['target_field_name']]);
$this->notSentFields[] = $ruleField['target_field_name'];
}
}
}
// Loop on every relationship and calculate the value
2 changes: 1 addition & 1 deletion src/Solutions/airtable.php
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ class airtablecore extends solution
* This is initialised to 'Contacts' by default as I've assumed that would be the most common possible value.
* However, this can of course be changed to any table value already present in your Airtable base.
*/
protected array $tableName;
protected array $tableName = [];

/**
* Can't be greater than 100.