Skip to content

fix: [PIDM-1487] add missing cbill set to update mapper#584

Merged
dylantangredi-jakala merged 5 commits intomainfrom
PIDM-1487-fix-empty-cbill
Feb 13, 2026
Merged

fix: [PIDM-1487] add missing cbill set to update mapper#584
dylantangredi-jakala merged 5 commits intomainfrom
PIDM-1487-fix-empty-cbill

Conversation

@dylantangredi-jakala
Copy link
Collaborator

@dylantangredi-jakala dylantangredi-jakala commented Feb 11, 2026

List of Changes

  • added set CBILL to update mapper

Motivation and Context

This change was required to fix a problem where the CBILL filed would get emptied when updating the creditor institution info. This goes together with the front end fix here ->

How Has This Been Tested?

  • unit test added
  • DEV test -> see fix: [PIDM-1487] add missing cbill to payloads pagopa-selfcare-frontend#858 (comment)
  • local curls that simulate the flow ->
    • verify cbillCode is currently "4444"
      curl -s "http://localhost:8080/creditor-institutions/99999000013" \
      -H "Authorization: Bearer <JWT>" | python3 -m json.tool

    • response

      { "ciTaxCode": "99999000013", "enabled": true, "businessName": "EC DEMO DIRECT", "cbillCode": "4444", "address": { "location": "Via Roma", "city": "Roma", "zipCode": "80122", "countryCode": "RM", "taxDomicile": "Via Roma" }, "pspPayment": false, "reportingFtp": false, "reportingZip": false }

    • simulate the frontend payload (no cbillCode AS IS, fixed with PR -> )

      curl -X PUT "http://localhost:8080/creditor-institutions/99999000013" \
      -H "Authorization: Bearer <JWT>" \
      -H "Content-Type: application/json" \
      -d '{"creditorInstitutionCode":"99999000013","enabled":true,"businessName":"EC DEMO DIRECT","address":{"location":"Via Roma","city":"Roma","zipCode":"80122","countryCode":"RM","taxDomicile":"Via Roma"},"pspPayment":false,"reportingFtp":false,"reportingZip":false}'

    • check if cbillCode was wiped (proves the bug still exists without the FE fix)

      curl -s "http://localhost:8080/creditor-institutions/99999000013" \ -H "Authorization: Bearer <JWT>" | python3 -m json.tool

    • response

      { "ciTaxCode": "99999000013", "enabled": true, "businessName": "EC DEMO DIRECT", "address": { "location": "Via Roma", "city": "Roma", "zipCode": "80122", "countryCode": "RM", "taxDomicile": "Via Roma" }, "pspPayment": false, "reportingFtp": false, "reportingZip": false }

    • restore and now simulate the fixed frontend payload (with cbillCode)

      curl -X PUT "http://localhost:8080/creditor-institutions/99999000013" \
      -H "Authorization: Bearer <JWT>" \
      -H "Content-Type: application/json" \
      -d '{"creditorInstitutionCode":"99999000013","enabled":true,"businessName":"EC DEMO DIRECT","cbillCode":"4444","address":{"location":"Via Roma","city":"Roma","zipCode":"80122","countryCode":"RM","taxDomicile":"Via Roma"},"pspPayment":false,"reportingFtp":false,"reportingZip":false}'

    • verify cbillCode is preserved

      curl -s "http://localhost:8080/creditor-institutions/99999000013" \ -H "Authorization: Bearer <JWT>" | python3 -m json.tool

    • response

      { "ciTaxCode": "99999000013", "enabled": true, "businessName": "EC DEMO DIRECT", "cbillCode": "4444", "address": { "location": "Via Roma", "city": "Roma", "zipCode": "80122", "countryCode": "RM", "taxDomicile": "Via Roma" }, "pspPayment": false, "reportingFtp": false, "reportingZip": false }

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@dylantangredi-jakala dylantangredi-jakala self-assigned this Feb 11, 2026
@dylantangredi-jakala dylantangredi-jakala added bug Something isn't working patch labels Feb 11, 2026
ciuffagianluca
ciuffagianluca previously approved these changes Feb 11, 2026
pietro-tota
pietro-tota previously approved these changes Feb 12, 2026
@dylantangredi-jakala dylantangredi-jakala merged commit f8710b1 into main Feb 13, 2026
16 checks passed
@dylantangredi-jakala dylantangredi-jakala deleted the PIDM-1487-fix-empty-cbill branch February 13, 2026 08:28
@sonarqubecloud
Copy link

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

Labels

bug Something isn't working patch size/small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants