Skip to content

Make the attach-to-workflows setting per financial type

DaveD requested to merge DaveD/cdntaxreceipts:workflows into master

I admit this looks a little big. I could break it up, or think of it in 5 parts as below. Also the changes in cdntaxreceipts.php and the unit test are easier to see with whitespace changes hidden.

  1. Moving the related code into its own function for tidiness and ease of unit testing.
  2. Removing the groupName etc extra logic needed to support pre-5.47 code. It's just $params['workflow'] now.
  3. The actual feature, which converts the setting from '0'/'1' to a list of financial types and then uses that list. Note the way select2 returns the values is as a string like '0,2,3', which oddly means "2 and 3". Or in the case of no selection, is also oddly '0'.
    • And I tacked on a hook to allow using your own criteria.
  4. The upgrade step.
  5. Updating/adding unit tests.

Merge request reports

Loading