Support for Custom Workflows

Created on 28 June 2022, over 2 years ago
Updated 13 September 2024, 2 months ago

If an order does not use the fulfillment, validation should these show up as options? Also I have a custom workflow for an order type, however it seems that this only checks the order_fulfillment_validation. Is there a way to specify a custom workflow?

Thanks in advance

Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

🇺🇸United States Christopher Riley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States drakythe

    I've done an initial commit to 3293176-support-for-custom branch that pulls the hardcoded workflow value and instead loads the default commerce_order_type and pulls the workflow ID from there. I do check for a null value in case the default order type has been deleted, in that case I set it to fallback to order_fulfillment_validation. Otherwise no other changes. (I did add a line to the README.md file to explain where the state change option set is coming from)

    I'm marking this as "Needs work" because while this works for simple commerce sites it would not work well for sites with multiple checkout workflows that use different status sets for each. I'm not sure what the best way to handle that might be though. My instinct is add a field to the Views Bulk Operations configuration screen on views and assign the product type's workflow you want assigned to that particular view. I'm unsure how that can be achieved only on Order views and whether that value can be saved into the current DB structure and then later checked for use. Alternatively a settings form could be created which lists out every Order view and let administrators set the Order Types that way. Again though, will need to figure out how to filter views displays down to Order Views that have VBO fields on it.

    I'm also very unsure if that extra part is even necessary as the branch has enough changes in it to work for probably a great majority of Drupal commerce situations, so it could be merged in for the time being.

  • 🇺🇸United States drakythe

    Attached is a patch file for anyone who would like these change and is using cweagans/composer-patches.

  • 🇬🇧United Kingdom aaron.ferris

    First off, thanks for this module - I just came across this exact use case, custom workflow. Patch works well from my brief testing.

  • 🇧🇪Belgium stijnd Belgium

    Patch works perfect for my use case but it might need some more testing with multiple Order types (with different workflows).

  • First commit to issue fork.
  • Status changed to Needs review 6 months ago
  • 🇮🇳India AkashKumar07

    I have committed the changes in the issue branch. Needs review!

  • Status changed to RTBC 4 months ago
  • 🇮🇳India rakesh.drupal Delhi

    I have reviewed the changes and it looks good to me.

  • Status changed to Fixed 3 months ago
  • 🇩🇪Germany Anybody Porta Westfalica

    @AkashKumar07 looks like this is fixed?! Was merged into 8.x-2.x!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024