Skip to content

Commit

Permalink
LEAF-4559 - Adjustments to account for positions on disabled users.
Browse files Browse the repository at this point in the history
  • Loading branch information
shane committed Oct 23, 2024
1 parent c93d45a commit 87c45d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions LEAF_Request_Portal/admin/templates/mod_account_updater.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,12 @@ function searchGroupsOldAccount(accountAndTaskInfo, queue) {
function searchPositionsOldAccount(accountAndTaskInfo, queue) {
const { oldAccount, newAccount } = accountAndTaskInfo;
return new Promise ((resolve, reject) => {
fetch(`${orgchartPath}/api/position/search?q=username:${oldAccount}&employeeSearch=1&noLimit=1`)
fetch(`${orgchartPath}/api/position/search?q=username.disabled:${oldAccount}&employeeSearch=1&noLimit=1`)
.then(res => res.json())
.then(data => {
let positionInfo = {};
const userPositions = data.filter(p => p.employeeList.some(emp => emp.userName === oldAccount));
console.log(userPositions);
if (userPositions.length > 0) {
let recordIDs = '';
userPositions.forEach(ele => {
Expand Down

0 comments on commit 87c45d8

Please sign in to comment.