Jump to content


Photo

[bug] x2workflow trigger: Process Stage Started does not work with "any"


  • Please log in to reply
2 replies to this topic

#1 that0n3guy

that0n3guy

    Advanced Member

  • Premium Members
  • PipPipPip
  • 282 posts

Posted 07 February 2018 - 12:01 PM

I found a bug.   I even tested it on x2crm's demo server v6.5.2.  
 
Description:
A trigger of Process stages started does not work the stage of "any" for stages created (no default).
 
How to reproduce (these can be seen in this video as well: https://goo.gl/yQsRSu):
  • create a new process called "test" with 3 stages and make is so they require all previous
  • create a new flow, trigger based on "process stage started"
  • set trigger condition to be the new stage called "test" with a stage of "any", record type of opportunity
  • open an opportunity
  • start a stage on the "test" process
  • view trigger logs... see failure
 
Here is an image of the log failure: https://imgur.com/a/WO9hX
 
The video ( https://goo.gl/yQsRSu) also shows:
  • this working on the default "General sales" process.    
  • I switches back to the new process and it fails again.


#2 that0n3guy

that0n3guy

    Advanced Member

  • Premium Members
  • PipPipPip
  • 282 posts

Posted 07 February 2018 - 12:14 PM

After looking at some code.. (this: https://github.com/X...igger.php#L51)  it looks like "any" is supposed to be "" (ie... blank).   

 

 

When I look at the html of the "any" option in the flow, it looks like this:

<div class="cell x2fields-value">
   <select name="value">
      <option value="any">Any</option>
      <option value="1">one</option>
      <option value="2">two</option>
   </select> 
</div>

When I mess with the html in chrome inspector, and I force 

value="any" 

to be 

value=""

and save the flow... it works.

 

 

Solution (i've not tested this... just a guess): 

change https://github.com/X...roller.php#L884so that its '' instead of 'any'... but I don't know if that will work because thats an empty array key.



#3 X2Isaiah

X2Isaiah

    Advanced Member

  • Moderators
  • 256 posts

Posted 12 February 2018 - 10:39 AM

Thank you for letting us know! We will try to include this fix in the upcoming release


Isaiah Solomon

Software Engineer

X2Engine Inc.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users