Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vtigercrm
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Welcome to Vtiger Community. To gain access for account, please contact [ community @ vtiger.com ]
Show more breadcrumbs
Martin Allen
vtigercrm
Commits
05ff8ce0
Commit
05ff8ce0
authored
8 years ago
by
Satish
Browse files
Options
Downloads
Patches
Plain Diff
Fixes #482 - Workflow Duplicated Condition (All)
parent
c571b6e8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Migration/schema/660_to_700.php
+26
-0
26 additions, 0 deletions
modules/Migration/schema/660_to_700.php
with
26 additions
and
0 deletions
modules/Migration/schema/660_to_700.php
+
26
−
0
View file @
05ff8ce0
...
...
@@ -26,6 +26,32 @@ if(defined('VTIGER_UPGRADE')) {
$db
->
pquery
(
'ALTER TABLE vtiger_crmentity ADD COLUMN smgroupid INT(19)'
,
array
());
}
require_once
'modules/com_vtiger_workflow/VTWorkflowManager.inc'
;
$result
=
$db
->
pquery
(
'SELECT DISTINCT workflow_id FROM com_vtiger_workflows WHERE summary=?'
,
array
(
'Ticket Creation From Portal : Send Email to Record Owner and Contact'
));
if
(
$db
->
num_rows
(
$result
))
{
$wfs
=
new
VTWorkflowManager
(
$db
);
$workflowModel
=
$wfs
->
retrieve
(
$db
->
query_result
(
$result
,
0
,
'workflow_id'
));
$selectedFields
=
array
();
$conditions
=
Zend_Json
::
decode
(
html_entity_decode
(
$workflowModel
->
test
));
if
(
$conditions
)
{
foreach
(
$conditions
as
$conditionKey
=>
$condition
)
{
if
(
$condition
[
'fieldname'
]
==
'from_portal'
)
{
$selectedFieldKeys
[]
=
$conditionKey
;
}
}
foreach
(
$selectedFieldKeys
as
$key
=>
$conditionKey
)
{
if
(
$key
)
{
unset
(
$conditions
[
$conditionKey
]);
}
}
$workflowModel
->
name
=
$workflowModel
->
description
;
$workflowModel
->
test
=
Zend_Json
::
encode
(
$conditions
);
$wfs
->
save
(
$workflowModel
);
}
}
$db
->
pquery
(
'UPDATE vtiger_def_org_share SET editstatus=? WHERE tabid=?'
,
array
(
0
,
getTabid
(
'Contacts'
)));
$db
->
pquery
(
'UPDATE vtiger_field SET presence=0 WHERE columnname=? AND fieldname=?'
,
array
(
'emailoptout'
,
'emailoptout'
));
$db
->
pquery
(
'UPDATE vtiger_settings_field SET name=? WHERE name=?'
,
array
(
'Configuration Editor'
,
'LBL_CONFIG_EDITOR'
));
$db
->
pquery
(
'UPDATE vtiger_links SET linktype=? WHERE linklabel=?'
,
array
(
'DETAILVIEW'
,
'LBL_SHOW_ACCOUNT_HIERARCHY'
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment