Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
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
Package Registry
Model registry
Operate
Terraform modules
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
Madhuk
vtigercrm
Commits
ef4d64f4
Commit
ef4d64f4
authored
11 months ago
by
Prasad
Browse files
Options
Downloads
Patches
Plain Diff
Fixes #1859: Add ModComments relation to Inventory modules
parent
bece55ce
No related branches found
Branches containing commit
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/811_to_812.php
+14
-0
14 additions, 0 deletions
modules/Migration/schema/811_to_812.php
with
14 additions
and
0 deletions
modules/Migration/schema/811_to_812.php
+
14
−
0
View file @
ef4d64f4
...
...
@@ -8,4 +8,18 @@ if (defined('VTIGER_UPGRADE')) {
// Trim the space in value.
$db
->
pquery
(
'UPDATE vtiger_projecttaskstatus set projecttaskstatus = "Canceled" where projecttaskstatus = "Canceled "'
,
array
());
// Ensure related-tab for ModComments on Inventory modules (if missed in previous migration)
$modCommentsInstance
=
Vtiger_Module_Model
::
getInstance
(
'ModComments'
);
$modCommentFieldInstance
=
Vtiger_Field_Model
::
getInstance
(
'related_to'
,
$modCommentsInstance
);
foreach
(
getInventoryModules
()
as
$refModuleName
)
{
$refModuleModel
=
Vtiger_Module_Model
::
getInstance
(
$refModuleName
);
$rs
=
$db
->
pquery
(
"SELECT 1 FROM vtiger_relatedlists WHERE tabid=? and related_tabid=? and relationfieldid=? limit 1"
,
array
(
$refModuleModel
->
id
,
$modCommentsInstance
->
id
,
$modCommentFieldInstance
->
id
));
if
(
!
$db
->
num_rows
(
$rs
))
{
$refModuleModel
->
setRelatedList
(
$modCommentsInstance
,
"ModComments"
,
''
,
'get_comments'
,
$modCommentFieldInstance
->
id
);
}
}
}
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