Skip to content

Zaaktype to casetype sync#79

Open
bbrands02 wants to merge 27 commits into
mainfrom
feature/GW-1701/zaaktype-to-casetype
Open

Zaaktype to casetype sync#79
bbrands02 wants to merge 27 commits into
mainfrom
feature/GW-1701/zaaktype-to-casetype

Conversation

@bbrands02
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/Service/ZGWToXxllncService.php Outdated
Comment on lines +410 to +417
if (isset($zaakTypeArrayObject['roltypen']) === true) {
foreach ($zaakTypeArrayObject['roltypen'] as $key => $roltype) {
if (is_array($roltype) === true) {
// Backup uuid is for when creating a rol in zaaksysteem (u have to give uuid instead they generate it).
$zaakTypeArrayObject['roltypen'][$key]['backupUuid'] = Uuid::uuid4()->toString();
}
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is er een casus dat roltypen niet bestaat? Normaal zou ik verwachten dat het een empty array is, en dan skip je hem al met je foreach (foreach ([] as $key => $value) {} komt neer op 'skip deze code').

$source,
'/admin/catalog/create_versioned_casetype',
'POST',
[
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded call?

Comment on lines +373 to +374
dump($result->getBody()->getContents());
dump('test');die;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming this is because we're still reviewing a draft.

true
);
dump($result->getBody()->getContents());
dump('test');die;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dumps and die

*
* @return array caseType array.
*/
public function mapZGWZaakTypeToXxllnc(?string $casetypeId = null, ObjectEntity $zaakTypeObject, array $zaakTypeArrayObject): array
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

properties with default value should be the last values:
ObjectEntity $zaakTypeObject, array $zaakTypeArrayObject, ?string $casetypeId = null


// Only get synchronization that has a sourceId.
$synchronization = null;
if ($zaakTypeObject->getSynchronizations() && isset($zaakTypeObject->getSynchronizations()[0]) === true && $zaakTypeObject->getSynchronizations()[0]->getSourceId()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would use isset or empty here

* @return array empty
* @throws Exception
*/
public function syncZaakTypeToXxllnc(): array
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could combine some of the if isset checks here into less if statements (optional)

Comment thread composer.json
"common-gateway/zgw-bundle": ">=1.0.40"
"php": ">=8.2",
"commongateway/corebundle": "^1.3.18 | <2.0",
"common-gateway/zgw-bundle": ">=1.2.13"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are higher versions available for both of these ^

@@ -145,7 +145,17 @@
"actionHandler": "CommonGateway\\XxllncZGWBundle\\ActionHandler\\ZGWToXxllncHandler",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this only works if you only need 1 action for this 1 ActionHandler, I always recommend using a separate action.json file instead

@@ -5,7 +5,8 @@
"version": "0.0.1",
"description": "xxllnc zaaksysteem v2 api",
"location": "!ChangMe!",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder: for any test or acc source it is oke and often helpfull to add a location, just don't add any auth

Comment thread Installation/Schema/xxllnc-zaaktype-post.json Outdated
"authorization": "[]",
"child_casetype_settings.enabled": "false",
"child_casetype_settings.child_casetypes": "[]",
"change_log.update_description": "{% if onderwerp|default %}{{ onderwerp }}{% else %}{{ 'test' }}{% endif %}",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else = 'test'
is this oke?

"registrationform.show_contact_details": "true",
"registrationform.allow_add_relations": "true",
"webform.public_confirmation_title": "Uw zaak is geregistreerd",
"webform.public_confirmation_message": "Bedankt voor het [[case.casetype.initiator_type]] van een <strong>[[case.casetype.name]]</strong>. Uw registratie is bij ons bekend onder <strong>zaaknummer [[case.number]]</strong>. Wij verzoeken u om bij verdere communicatie dit zaaknummer te gebruiken. De behandeling van deze zaak zal spoedig plaatsvinden.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(how) Does this work? 🤔
[case.casetype.initiator_type]

@WilcoLouwerse
Copy link
Copy Markdown
Contributor

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants