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: eindstatus duplicate check used less precise zaak einddatum instead of eindstatus datumstatusgezet resulting in duplicate check false positives #267

14 changes: 10 additions & 4 deletions e2e/SoapUI/zaakbrug-e2e-soapui-project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7861,6 +7861,12 @@ testRunner.testCase.getTestStepByName("Properties").setPropertyValue('DocumentBa
</con:request>
</con:config>
</con:testStep>
<con:testStep type="delay" name="Delay" id="c3bf4b94-4ffa-4906-9efa-53aa7dbfad14">
<con:settings/>
<con:config>
<delay>1000</delay>
</con:config>
</con:testStep>
<con:testStep type="request" id="fbfc19b1-8f1e-48f7-8364-4a9ba2e0bfc9" name="11-zds-updateZaak_Lk01-Einde">
<con:settings/>
<con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Expand Down Expand Up @@ -7936,10 +7942,10 @@ testRunner.testCase.getTestStepByName("Properties").setPropertyValue('DocumentBa
<ZKN:zkt.code>B1026</ZKN:zkt.code>\r
<ZKN:zkt.omschrijving>Aanvraag minima</ZKN:zkt.omschrijving>\r
<ZKN:volgnummer>0010</ZKN:volgnummer>\r
<ZKN:code>ontv</ZKN:code>
<ZKN:omschrijving>Ontvangen</ZKN:omschrijving>
<!-- <ZKN:code>Afgehandeld</ZKN:code>\r-->
<!-- <ZKN:omschrijving>Afgehandeld</ZKN:omschrijving>\r-->
<!-- <ZKN:code>ontv</ZKN:code>-->
<!-- <ZKN:omschrijving>Ontvangen</ZKN:omschrijving>-->
<ZKN:code>Afgehandel</ZKN:code>\r
<ZKN:omschrijving>Afgehandel</ZKN:omschrijving>\r
<ZKN:ingangsdatumObject xsi:nil="true" StUF:noValue="geenWaarde"/>\r
</ZKN:gerelateerde>\r
<ZKN:datumStatusGezet>${=import java.text.SimpleDateFormat; SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSS"); sdf.setTimeZone(TimeZone.getTimeZone("${#Project#ZdsTimezone}")); sdf.format(new Date());}</ZKN:datumStatusGezet>\r
Expand Down
42 changes: 36 additions & 6 deletions src/main/configurations/Translate/Configuration_ZdsHeeft.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,19 @@
styleSheetName="CreeerZaak_LK01/xsl/CompareDatumStatusGezet.xsl"
>
<Param name="StatusBody" sessionKey="StatusBody" type="DOMDOC"/>
<Forward name="success" path="CheckForCompareResult"/>
<Forward name="success" path="CheckForCompareDatumStatusGezetResult"/>
</XsltPipe>

<XmlIfPipe name="CheckForCompareResult"
<XmlIfPipe name="CheckForCompareDatumStatusGezetResult"
preserveInput="true"
xpathExpression="exists(/result/exception)"
>
<Forward name="then" path="ResultWithErrorMessage"/>
<Forward name="else" path="CheckForStatusExists"/>
<Forward name="then" path="ResultWithDatumErrorMessage"/>
<Forward name="else" path="CompareStatusType"/>
</XmlIfPipe>

<XsltPipe
name="ResultWithErrorMessage"
name="ResultWithDatumErrorMessage"
styleSheetName="Common/xsl/BuildError.xsl"
>
<Param name="code" value="TechnicalError" /> <!-- codes: TechnicalError, TranslationError, ConfigurationError-->
Expand All @@ -132,9 +132,39 @@
<Forward name="exception" path="EXCEPTION" />
</XsltPipe>

<XsltPipe
name="CompareStatusType"
getInputFromSessionKey="ZgwStatussen"
storeResultInSessionKey="StatusExists"
styleSheetName="CreeerZaak_LK01/xsl/CompareStatusType.xsl"
>
<Param name="StatusBody" sessionKey="StatusBody" type="DOMDOC"/>
<Forward name="success" path="CheckForCompareStatusTypeResult"/>
</XsltPipe>

<XmlIfPipe name="CheckForCompareStatusTypeResult"
preserveInput="true"
xpathExpression="exists(/result/exception)"
>
<Forward name="then" path="ResultWithTypeErrorMessage"/>
<Forward name="else" path="CheckForStatusExists"/>
</XmlIfPipe>

<XsltPipe
name="ResultWithTypeErrorMessage"
styleSheetName="Common/xsl/BuildError.xsl"
>
<Param name="code" value="TechnicalError" /> <!-- codes: TechnicalError, TranslationError, ConfigurationError-->
<Param name="reason" pattern="ActualiseerStatus statustype equal to existing status" />
<Param name="details" sessionKey="StatusBody" xpathExpression="concat(ZgwStatus/statustype, ' is equal to existing status')"/>
<Param name="detailsXml" sessionKey="ZgwStatussen" type="DOMDOC" />
<Forward name="success" path="EXCEPTION" />
<Forward name="exception" path="EXCEPTION" />
</XsltPipe>

<XmlIfPipe name="CheckForStatusExists"
emptyInputReplacement="&lt;statusExists&gt;false&lt;/statusExists&gt;"
xpathExpression="/statusExists = 'true'"
xpathExpression="//statusExists = 'true'"
>
<Forward name="then" path="EXIT"/>
<Forward name="else" path="AddToNewStatuses"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:zgw="http://google.com/zgw" version="2.0">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes" />
<xsl:param name="StatusBody" />
<xsl:param name="Beeindigd" />

<xsl:template match="/">
<result>
<xsl:for-each select="ZgwStatussen/ZgwStatus">
<xsl:if test="statustype = $StatusBody/ZgwStatus/statustype">
<xsl:choose>
<xsl:when test="$Beeindigd">
<exception>ConverterException</exception>
</xsl:when>
<xsl:otherwise>
<statusExists>true</statusExists>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</result>
</xsl:template>

</xsl:stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@

<xsl:variable name="DatumStatusGezetFromParams" as="xs:string">
<xsl:choose>
<xsl:when test="$ZgwStatusType/ZgwStatusType/isEindstatus = 'true' and not($ZdsEinddatum = 'Undefined')">
<xsl:when test="$ZgwStatusType/ZgwStatusType/isEindstatus = 'true'
and (string-length($ZdsEinddatum) > 0)
and (string-length($ZdsStatusDatum) = 0)
and not($ZdsEinddatum = 'Undefined')">
<xsl:value-of select="zgw:toZgwDatetime(concat($ZdsEinddatum,'000000'))"/>
</xsl:when>
<xsl:otherwise>
Expand Down
Loading