dev/core#2717 Use order api for new membership create in batch #21152
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
dev/core#2717 Use order api for new membership create in batch
Before
Batch membership create calls membership bao directly
After
As with the back office membership form it calls the order api
Technical Details
@kcristiano this is really how I think the code should wind up looking for this flow (although the renew flow still needs more work.) It really does surface the setting of the end date though as the order flow expectst that all 3 dates will be set when it is in pending status. I have fixed it to that in the BAO - but it does mean it's not possible to avoid setting it if I do it this way.
I guess I could only pass in date fields if they are populated - which would cause the BAO to otherwise set them, That might be where I end up as I think we can treat the failure to set end_date as a bug.
Comments