MODORDERS-243 we started creating encumbrances when orders transition to Open. While testing that story it was discovered that references to created encumbrances aren't added if one of the encumbrances couldn't be created.
Here's the exact case I'm referring to:
- Create a pending order with 2 fund distros - one valid, the other referring to a non-existent fund
- Transition the order to Open
- The order remains in Pending
- An encumbrance for the valid fund is created, but the POL/fundDistro is not updated
See the comments in
MODORDERS-243 for additional details
- If an encumbrance is created, the pol/fund distro is updated to refer to it.
- unit tests are updated
- api tests are updated