Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow Module - Start with operator not working #7030

Closed
pavithra-selvam opened this issue Mar 8, 2019 · 5 comments
Closed

Workflow Module - Start with operator not working #7030

pavithra-selvam opened this issue Mar 8, 2019 · 5 comments
Labels
Area: Workflow Issues & PRs related to all things regarding workflow Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Type: Bug Bugs within the core SuiteCRM codebase

Comments

@pavithra-selvam
Copy link

pavithra-selvam commented Mar 8, 2019

Workflow module

Issue

Workflow module - contains , start with and end with operator not working in all versions.

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

1.Create workflow
2.add condition and select operator is any one like start with,end with or contains.

Context

Your Environment

SuiteCRM Version: 7.9.7
PHP: 7

@cameronblaikie cameronblaikie added Type: Bug Bugs within the core SuiteCRM codebase Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds labels Mar 8, 2019
@pavithra-selvam
Copy link
Author

pavithra-selvam commented Mar 8, 2019

Hello admin,
i found solution for this can you please test and is it okay can you please commit to your next release.
in modules/AOW_WorkFlow/AOW_WorkFlow.php file can you please repleace these lines.
case "Starts_With" : return strrpos($var1,$var2, -strlen($var1));
case "Ends_With" : return strpos($var1,$var2,strlen($var1) - strlen($var2));

insted of
case "Starts_With" :
$length = strlen($var2);
return (substr($var1, 0, $length) === $var2);
case "Ends_With" :
$length = strlen($var2);
if ($length == 0) {
return true;
}
return (substr($var1, -$length) === $var2);

Thanks
Pavithra

@pgorod
Copy link
Contributor

pgorod commented Mar 8, 2019

@pavithra-selvam thanks for that.

Do you want to try and make a Pull Request? For such a simpe change, it's easy to do from Github web interface.

Just go here (notice that I selected the branch for you):
https://github.com/salesagility/SuiteCRM/blob/hotfix-7.10.x/modules/AOW_WorkFlow/AOW_WorkFlow.php

And click the ✏️ icon to edit the file, then save your changes and write up the text for the PR. I can help you if you run into problems. Thanks!

@pavithra-selvam
Copy link
Author

@pgorod ,
Thanks for your help, i followed your instruction and updated file. is everything fine or need to change anything?.
Thanks!

@pgorod
Copy link
Contributor

pgorod commented Mar 9, 2019

When you edit the file, Github automatically forked the SuiteCRM repo into your own Github area, and created a commit there. Then you were given the option to create a Pull Request (asking the SuiteCRM maintainers to integrate your patch), but it seems you didn't finish that step.

The full process is described here:
https://help.github.com/en/articles/editing-files-in-another-users-repository

You don't have to repeat everything, you can just go here
https://github.com/salesagility/SuiteCRM/compare/hotfix-7.10.x...pavithra-selvam:patch-1?expand=1

and start the PR. Thanks

@pavithra-selvam
Copy link
Author

@pgorod
Thanks for your help pgorod.. I created pull request.
Thanks!

@pgorod pgorod mentioned this issue Mar 11, 2019
6 tasks
@Dillon-Brown Dillon-Brown added Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Area: Workflow Issues & PRs related to all things regarding workflow labels Mar 14, 2019
AlbertoSTIC pushed a commit to SinergiaTIC/SuiteCRM that referenced this issue Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Workflow Issues & PRs related to all things regarding workflow Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Type: Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

4 participants