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

RC - dev to vapo #2621

Merged
merged 29 commits into from
Dec 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d3a1a1f
LEAF 4455 data.metadata read for forms and report builder cells
aerinkayne Oct 18, 2024
1c63e27
Merge branch 'master' into enhance/LEAF-4455/metadata_read_all
aerinkayne Oct 23, 2024
37614a9
LEAF 4455 action_history table read metadata
aerinkayne Oct 30, 2024
cb6420e
LEAF exper server side get progress
aerinkayne Nov 26, 2024
3643446
LEAF exper, formjs side validation, remove error_log
aerinkayne Nov 26, 2024
a8f67b9
LEAF 4604 move count_required to own method, update param
aerinkayne Nov 27, 2024
d1f3ee0
LEAF 4455 get updates from master, resolve submodule conflicts
aerinkayne Nov 27, 2024
f015626
LEAF 4455 records and notes userMetadata read
aerinkayne Dec 2, 2024
e1ea6a5
LEAF 4455 display val logic consistency, read approverName, fix appro…
aerinkayne Dec 2, 2024
b197710
LEAF 4455 read metadata for resolvedBy, remove VAMC init for that lookup
aerinkayne Dec 2, 2024
f2cec1b
LEAF 4455 metadata read, dep -2 requestor followup steps
aerinkayne Dec 2, 2024
e20c490
LEAF 4604 rename some variables, add total tracking
aerinkayne Dec 3, 2024
aeec897
LEAF 4604 comment unused / pending checkbox logic, add trim to data v…
aerinkayne Dec 3, 2024
1911d7a
Revert "LEAF 4455 metadata read, dep -2 requestor followup steps"
aerinkayne Dec 4, 2024
39b09e3
LEAF 4455 keep lookup if pending action, use metadata if avail for mo…
aerinkayne Dec 4, 2024
fdd9aa0
LEAF 4604 method signature per feedback
aerinkayne Dec 4, 2024
a60a75a
LEAF 4455 update q to use record usermetadata instead of join
aerinkayne Dec 5, 2024
f9b7b15
LEAF 4455 use metadata info for comment when setting initiator
aerinkayne Dec 5, 2024
56140ce
LEAF 4455 Report Builder, userID instead of null for inactive accounts
aerinkayne Dec 5, 2024
4955503
LEAF 4455 add actionType to filterData for cancelled by display,
aerinkayne Dec 5, 2024
4b0b014
LEAF 4455 revert view reports change except for join call, handle dis…
aerinkayne Dec 6, 2024
f3cfc8a
LEAF 4455 remove unneeded sql trim for comparison
aerinkayne Dec 6, 2024
a5ac942
LEAF 4455 revert -2 text update since this info is already elsewhere
aerinkayne Dec 9, 2024
a6ea261
LEAF 4455 keep initiatorName query distinct from general records query
aerinkayne Dec 9, 2024
f8c11b7
LEAF 4455 inactive user verbiage, simplify empty metadata check
aerinkayne Dec 10, 2024
9f6733f
Merge pull request #2613 from department-of-veterans-affairs/enhance/…
Pelentan Dec 12, 2024
ab2d96e
Merge pull request #2615 from department-of-veterans-affairs/enhance/…
Pelentan Dec 12, 2024
53146f4
Revert "Merge pull request #2615 from department-of-veterans-affairs/…
aerinkayne Dec 12, 2024
1a15579
Merge pull request #2620 from department-of-veterans-affairs/revert_d…
Pelentan Dec 12, 2024
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
Prev Previous commit
Next Next commit
LEAF 4455 display val logic consistency, read approverName, fix appro…
…verName userID
aerinkayne committed Dec 2, 2024
commit e1ea6a5c97ed9ee6f613aa43120eab7b81e15585
21 changes: 12 additions & 9 deletions LEAF_Request_Portal/sources/Form.php
Original file line number Diff line number Diff line change
@@ -577,11 +577,12 @@ public function getIndicator($indicatorID, $series, $recordID = null, $parseTemp
else if ($data[0]['format'] == 'orgchart_employee'
&& !empty($data[0]['data']))
{
$form[$idx]['displayedValue'] = '';
if (isset($data[0]['metadata'])) {
$orgchartInfo = json_decode($data[0]['metadata'], true);
$form[$idx]['displayedValue'] = "{$orgchartInfo['firstName']} {$orgchartInfo['lastName']}";
} else {
$form[$idx]['displayedValue'] = '';
if(trim("{$orgchartInfo['firstName']} {$orgchartInfo['lastName']}") !== "") {
$form[$idx]['displayedValue'] = "{$orgchartInfo['firstName']} {$orgchartInfo['lastName']}";
}
}
}
else if ($data[0]['format'] == 'orgchart_position'
@@ -2609,7 +2610,7 @@ public function getCustomData(array $recordID_list, string|null $indicatorID_lis
$item['data'] = '';
if (isset($item['metadata'])) {
$orgchartInfo = json_decode($item['metadata'], true);
if(!empty($orgchartInfo['userName'])) {
if(trim("{$orgchartInfo['firstName']} {$orgchartInfo['lastName']}") !== "") {
$item['data'] = "{$orgchartInfo['firstName']} {$orgchartInfo['lastName']}";
$item['dataOrgchart'] = $orgchartInfo;
}
@@ -3819,14 +3820,14 @@ public function query(string $inQuery): mixed
$dir = new VAMC_Directory;

$actionHistorySQL =
'SELECT recordID, stepID, userID, time, description,
'SELECT recordID, stepID, userID, userMetadata, time, description,
actionTextPasttense, actionType, comment
FROM action_history
LEFT JOIN dependencies USING (dependencyID)
LEFT JOIN actions USING (actionType)
WHERE recordID IN (' . $recordIDs . ')
UNION
SELECT recordID, "-5", userID, timestamp, "Note Added",
SELECT recordID, "-5", userID, userMetadata, timestamp, "Note Added",
"Note Added", "LEAF_note", note
FROM notes
WHERE recordID IN (' . $recordIDs . ')
@@ -3836,8 +3837,10 @@ public function query(string $inQuery): mixed
$res2 = $this->db->prepared_query($actionHistorySQL, array());
foreach ($res2 as $item)
{
$user = $dir->lookupLogin($item['userID'], true);
$name = isset($user[0]) ? "{$user[0]['Fname']} {$user[0]['Lname']}" : $res[0]['userID'];
$userMetadata = json_decode($item['userMetadata'], true);
$name = isset($userMetadata) && trim("{$userMetadata['firstName']} {$userMetadata['lastName']}") !== "" ?
"{$userMetadata['firstName']} {$userMetadata['lastName']}" : $item['userID'];

$item['approverName'] = $name;

$data[$item['recordID']]['action_history'][] = $item;
@@ -4386,7 +4389,7 @@ private function buildFormTree($id, $series = null, $recordID = null, $parseTemp
$child[$idx]['displayedValue'] = '';
if (isset($data[$idx]['metadata'])) {
$orgchartInfo = json_decode($data[$idx]['metadata'], true);
if(!empty($orgchartInfo['userName'])) {
if(trim("{$orgchartInfo['firstName']} {$orgchartInfo['lastName']}") !== "") {
$child[$idx]['displayedValue'] = "{$orgchartInfo['firstName']} {$orgchartInfo['lastName']}";
}
}