Skip to content

Create digital address for betrokkene in Customer Interactions API#6280

Merged
annashamray merged 6 commits into
mainfrom
feature/6082-profile-existing-address
May 21, 2026
Merged

Create digital address for betrokkene in Customer Interactions API#6280
annashamray merged 6 commits into
mainfrom
feature/6082-profile-existing-address

Conversation

@annashamray
Copy link
Copy Markdown
Contributor

@annashamray annashamray commented May 11, 2026

Closes #6082

Changes

  • create a new digital address linked to "betrokkene" in Open Klant when
    • user selects existing address from dropdown
    • this is not a default address
    • they don't change the default preference (don't select "Sla mijn gegevens op
      voor de volgende keer.")

Checklist

Check off the items that are completed or not relevant.

  • Impact on features

    • Checked copying a form
    • Checked import/export of a form
    • Config checks in the configuration overview admin page
    • Checked new model fields are usable in the admin
    • Problem detection in the admin email digest is handled
  • Dockerfile/scripts

    • Updated the Dockerfile with the necessary scripts from the ./bin folder
  • Commit hygiene

    • Commit messages refer to the relevant Github issue
    • Commit messages explain the "why" of change, not the how
  • Documentation

    • Added documentation which describes the changes

@annashamray annashamray force-pushed the feature/6082-profile-existing-address branch from ef94940 to 74f89f8 Compare May 15, 2026 07:33
@annashamray annashamray marked this pull request as ready for review May 15, 2026 07:45
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.07%. Comparing base (d1c4275) to head (b54734b).
⚠️ Report is 54 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6280      +/-   ##
==========================================
- Coverage   97.08%   97.07%   -0.01%     
==========================================
  Files         872      866       -6     
  Lines       33122    32760     -362     
  Branches     2990     2982       -8     
==========================================
- Hits        32155    31802     -353     
+ Misses        652      646       -6     
+ Partials      315      312       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@annashamray annashamray changed the title Feature/6082 profile existing address Create digial address for betrokkene in Customer Interactions API May 15, 2026
@annashamray annashamray requested a review from robinmolen May 15, 2026 08:45
Copy link
Copy Markdown
Contributor

@robinmolen robinmolen left a comment

Choose a reason for hiding this comment

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

I have a few small suggestions, but otherwise this looks good!


# flow 3. we create a new address and link it to betrokkene
elif (
not is_address_new_preferred and address_value != prefill_preferred
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 had some difficulty trying to understand this condition (mostly because i wasn't sure what prefill_preferred was, as i forgot what the property preferred on the CommunicationChannel represented).

Because we have the same check for flow 5, it might be nice to define a is_preferred variable.

So:

is_preferred_address: bool = bool(address_value == prefill_preferred)

...

# flow 3. we create a new address and link it to betrokkene
elif not is_address_new_preferred and not is_preferred_address:

Bonus: in the type definition of CommunicationChannel it might be nice to add a comment what the property preferred contains. Something like:

class CommunicationChannel(TypedDict):
    type: SupportedChannels
    options: Sequence[str]
    preferred: str | None # The preferred address in this channel

Copy link
Copy Markdown
Contributor Author

@annashamray annashamray May 18, 2026

Choose a reason for hiding this comment

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

Yes, I think with these changes the code is more readable. I also changed if statements, I couldn't get rid of nested "ifs", but I think now is clearer what happens in each flow

Comment thread docs/configuration/prefill/communication_preferences.rst Outdated
Comment thread docs/configuration/prefill/communication_preferences.rst
@annashamray annashamray force-pushed the feature/6082-profile-existing-address branch from ad1c457 to 77bb2a7 Compare May 18, 2026 11:54
@annashamray annashamray requested a review from robinmolen May 18, 2026 12:51
@sergei-maertens sergei-maertens changed the title Create digial address for betrokkene in Customer Interactions API Create digital address for betrokkene in Customer Interactions API May 20, 2026
if prefill_communication_channel
else None
)
is_preferred_address: bool = bool(address_value == prefill_preferred)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
is_preferred_address: bool = bool(address_value == prefill_preferred)
is_preferred_address = address_value == prefill_preferred

the cast to bool is not necesary for a simple equality test

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changed

@annashamray annashamray force-pushed the feature/6082-profile-existing-address branch from 77bb2a7 to ae4d620 Compare May 21, 2026 07:52
@annashamray annashamray merged commit 02e8439 into main May 21, 2026
51 of 52 checks passed
@annashamray annashamray deleted the feature/6082-profile-existing-address branch May 21, 2026 09:57
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.

Use existing, non-default, email address in Partij in Open Klant and store this

3 participants