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

Fix #9928 - Email Recipients of Scheduled Reports not rendered correctly in List View #10521

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions include/ListView/ListViewSubPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,19 @@ public function process_dynamic_listview_rows($data, $parent_data, $smartyTempla
$aItem->parent_name_mod = $parent_data[$aItem->id]['parent_name_mod'];
}
}

$fields = $aItem->get_list_view_data();
$fieldDefs = $aItem->getFieldDefinitions();

foreach ($fields as $field => $value) {
if (base64_decode($value, true)) {
$field = strtolower($field);
if ($fieldDefs[$field]['function'] && $fieldDefs[$field]['function']['returns'] === 'html') {
$fields[strtoupper($field)] = call_user_func($fieldDefs[$field]['function']['name'], $aItem, $field, $value, $_REQUEST['action']);
}
}
}

if (isset($processed_ids[$aItem->id])) {
continue;
} else {
Expand Down
4 changes: 2 additions & 2 deletions modules/AOR_Scheduled_Reports/emailRecipients.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
*
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
* Copyright (C) 2011 - 2024 SalesAgility Ltd.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
Expand Down Expand Up @@ -68,7 +68,7 @@ function display_email_lines($focus, $field, $value, $view)
return $html;
}

if ($view === 'DetailView') {
if ($view === 'DetailView' || $view === 'ListView') {
$recipients = [];
$result = [];

Expand Down
4 changes: 3 additions & 1 deletion modules/AOR_Scheduled_Reports/vardefs.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
*
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
* Copyright (C) 2011 - 2024 SalesAgility Ltd.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
Expand Down Expand Up @@ -94,10 +94,12 @@
'duplicate_merge_dom_value' => 0,
'audited' => false,
'reportable' => false,
'inline_edit' => false,
'function' =>
array(
'name' => 'display_email_lines',
'returns' => 'html',
'onListView' => true,
'include' => 'modules/AOR_Scheduled_Reports/emailRecipients.php'
),
),
Expand Down