Closed (fixed)
Project:
Commerce Approve
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 May 2019 at 12:22 UTC
Updated:
29 Jun 2020 at 17:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kkumaren commentedComment #3
kkumaren commentedForgot to save the default approval text
Comment #4
kkumaren commentedComment #5
kkumaren commentedHere is an updated patch with latest commits
Comment #6
kkumaren commentedComment #7
kkumaren commentedComment #8
alexpottI think you need to do test for emptiness too... something like
!$productReferencedEntity->get('field_require_approval_text')->isEmpty()Otherwise this code can produce warnings.
Comment #9
kkumaren commentedAdded test to check if field is empty.
Also test if checkbox require approval is checked
Comment #10
travis-bradbury commentedI think you have the same problem for field_require_approval now.
The requiresApproval method's contract states that it returns an array or false
but it's actually returning an array, true, or null.
so that's either a bug or the spec needs to be updated.
Comment #11
alexpottThe default should be supplied in configuration and this needs to be in the config schema too.
Comment #12
skyredwangI removed the "default approval text" config, as it seems we haven't really used it. Therefore, we don't need a config for that either.
Comment #14
skyredwang