Repository navigation
Power BI model: a Workday Department column no longer breaks the refresh; fix the Workday wording - #144
Merged
Keith McGrane (Keithland89) merged 1 commit intoOct 20, 2026
Conversation
This was referenced Oct 20, 2026
Keith McGrane (Keithland89)
pushed a commit
that referenced
this pull request
Oct 20, 2026
Without #144, the models rename Department to Organization even when the org data already has Organization, and the refresh fails. On Azure, publish never drops a column, so the core and Agent Evaluator refreshes would keep failing. Section 0 says how to check whether the branch under test has it. It looks for #144's test, because this repo's history reuses PR numbers: an old commit is 'Analytics Hub installer 0.3.5 (#144)'. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Oct 20, 2026
Merged
…ssing; Workday wording The org query renamed the first department-like column to Organization even when the org data already had an Organization column, so a Workday export with a Department column failed the refresh. On Azure, publish never drops a column, so the refresh kept failing even after Workday was turned off. The query now renames Department only when there's no Organization column (option a), and leaves a blank Organization as it is. The new scripts/Update-Org-Department-Rename.py patches both Fabric templates and the Agent Evaluator. The installer builds the Fabric and Azure models from ValueLens - Fabric.pbit, so both get the fix. Workday org data only adds columns. The installer no longer says it adds or overrides org fields, and the installer, the org data load, the app and the docs no longer suggest it to people without a department. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keith McGrane (Keithland89)
force-pushed
the
keithmcgrane-microsoft-workday-department-rename-fix
branch
from
October 20, 2026 11:05
a2b45ce to
fd6187d
Compare
Keith McGrane (Keithland89)
pushed a commit
that referenced
this pull request
Oct 20, 2026
Brings in #142, #138 and #139 (the app's first pages load sooner), #143 (the Azure app is told which modules are off) and #144 (the model renames Department to Organization only when Organization is missing). No conflicts: CHANGELOG.md is the only file both sides change, and main's entries merge in around this branch's. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Oct 20, 2026
Keith McGrane (Keithland89)
pushed a commit
that referenced
this pull request
Oct 20, 2026
Without #144, the models rename Department to Organization even when the org data already has Organization, and the refresh fails. On Azure, publish never drops a column, so the core and Agent Evaluator refreshes would keep failing. Section 0 says how to check whether the branch under test has it. It looks for #144's test, because this repo's history reuses PR numbers: an old commit is 'Analytics Hub installer 0.3.5 (#144)'. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keith McGrane (Keithland89)
added a commit
that referenced
this pull request
Oct 20, 2026
…ng Dataverse (W2, 3 of 3) (#146) * Azure: turn on Agent Evaluator in the installer Adds the environment picker, the jobs' managed identity as a Dataverse application user with Bot Transcript Viewer, and removal on untick and uninstall. Gates the model on the module (as Fabric does) and its refresh on an environment the managed identity can read. The jobs skip the ae model until agentEvaluator is in VALUELENS_MODULES. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Azure: pass the Dataverse environments to the jobs, and test Agent Evaluator's gates and transcript access - Bicep and the ARM template: a dataverseEnvironments parameter, set as VALUELENS_DATAVERSE_ENVIRONMENTS on the jobs. - Tests for the two gate levels (model deployed, and an environment the managed identity can read), the schedule turned off with exactly { value: { enabled: false } }, the ledger of application users and roles, removal with the re-enable fallback, demo mode, re-ticking, a new managed identity, uninstall and status. - Dataverse client tests for removeRole, disableUser, enableUser and deleteUser. - Existing tests tick Agent Evaluator where they expect its model, and call azureSemanticModels with the whole config, as #125 does. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Azure: name the Agent Evaluator schedule-off variable apart from Consumption's #125 adds `const kept` for the Consumption model's schedule-off block in the same function, so a merge that keeps both blocks would declare it twice. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Docs: Agent Evaluator on Azure Describe the Azure transcript access step, the jobs' managed identity as a Dataverse application user with the Bot Transcript Viewer role, the two gates (pages once the model is deployed, refresh once an environment can be read), demo mode, update and uninstall, in the Azure, installer and jobs READMEs, DESIGN, ARCHITECTURE, PERMISSIONS, PREREQUISITES, TROUBLESHOOTING, UPDATE and the CHANGELOG. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Docs: the Agent Evaluator on Azure live-test runbook azure/AGENT-EVALUATOR-LIVE-TEST.md is for Keith to approve, not to run yet. It installs into a new resource group, adds the jobs' managed identity to one environment through the installer and to a second by hand in the admin center (by its client ID), and times the run. It then checks Repair or change against the gates: removing an environment, no environment to read, unticking and re-ticking the module, demo mode, status and uninstall, including whether Dataverse's Web API deletes an application user. tests/test_docs.py now checks its links. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Azure Agent Evaluator: VALUELENS_MODULES follows the tick; the environment list gates the jobs VALUELENS_MODULES now lists agentEvaluator whenever the module is ticked outside demo mode, as Fabric's flag does. #143 serves that list to the web app as app.config.json's modules, and use-source-freshness.ts reads modules.agentEvaluator for the Agent Evaluation page's data date, so the flag has to mean "ticked" on Azure too. The jobs' read and refresh gate moves to VALUELENS_DATAVERSE_ENVIRONMENTS. The installer sends '[]' until the managed identity can read a chosen environment, then every chosen environment. The jobs collect, and refresh ae, only when the module is listed and that list is non-empty; otherwise they log why and skip, and publish still runs. The installer's refresh, the Power BI schedule, and the alias, viewer, RLS and pendingReloads gates are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Agent Evaluator live-test runbook: rc.2, the uninstall order, the jobs' skip lines The live test runs on 0.6.8-rc.2, with Keith's approval. The uninstall steps follow #127's order: transcript access is removed right after the Teams app, before the Power BI workspace and resource group deletes. Step 10 expects the jobs' new skip lines while no environment is readable. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Live-test runbook: don't load a Department column without #144 Without #144, the models rename Department to Organization even when the org data already has Organization, and the refresh fails. On Azure, publish never drops a column, so the core and Agent Evaluator refreshes would keep failing. Section 0 says how to check whether the branch under test has it. It looks for #144's test, because this repo's history reuses PR numbers: an old commit is 'Analytics Hub installer 0.3.5 (#144)'. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Azure: every module is supported now, so drop the coming-soon wording With Agent Evaluator on, every catalog module has azure.supported=true, so nothing on Azure is coming soon any more. - planAzure's data prompt drops "Unsupported modules are coming soon on Azure." azureModuleChoices keeps its disabled-choice path for future modules. - installer/README.md, azure/README.md and azure/DESIGN.md drop their coming-soon and not-started lines. - planAzure's config.modules line gets back the indent it lost in the rebase onto main. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Keith Mcgrane <keithmcgrane@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keith McGrane (Keithland89)
pushed a commit
to microsoft/ValueLens-for-Microsoft-Copilot
that referenced
this pull request
Oct 24, 2026
… missing Port of microsoft/AnalyticsHub-Dashboard#144. The org query renamed the first department-like column to Organization even when the org data already had one, so a Workday export with a Department column (or an org CSV with both columns) failed the refresh. The installer's Fabric route offers Workday org data, so it would hit this. scripts/Update-Org-Department-Rename.py (from AH 1af87db) now covers all six live ValueLens templates: Fabric, Fabric OneLake, Agent Evaluator, Power Automate + Dataverse, SharePoint and Local CSV. Only the "Chat + Agent Org Data" query changes; ZIP metadata and every other member are unchanged, and the script is idempotent with --check. tests/test_org_department_rename.py is AH's test, scanning every live template outside archive/. The pinned Fabric schema hashes in test_consolidated_release.py move to the patched templates. Desktop refresh still needs a live check. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For 0.6.8. Keith decides the merge.
Summary
This does what Keith decided for the 0.6.8 plan's decision 13: option (a) only, plus the wording.
The bug. The "Chat + Agent Org Data" query renamed the first column whose name normalises to
departmenttoOrganization, without checking whetherOrganizationalready exists. The org table always hasOrganization, and the Workday org data adds any column the table lacks. So a Workday export with aDepartmentcolumn made the rename collide withOrganization, and the refresh failed. On Fabric it cleared once the column left the export. On Azure it didn't, because publish never drops a column. This was found by reading the code; the refresh hasn't been run (see Validation).The fix (a). The query renames
DepartmenttoOrganizationonly when there's noOrganizationcolumn:Organizationis left untouched. The model doesn't declare aDepartmentcolumn, so it isn't loaded.Departmentand noOrganizationstill gets it renamed, as today.Organizationisn't filled fromDepartment. That's option (a+), which Keith rejected.fabric/ValueLens - Fabric.pbit,fabric/ValueLens - Fabric OneLake.pbitandfabric/Add Agent Evaluator/Agent Evaluator.pbit. The change is in DataModelSchema, plus the Agent Evaluator's UnappliedChanges copy.fabric/Add Credit Consumption/Consumption Central - Fabric.pbithas no such rename.ValueLens - Fabric.pbit, so Azure gets the fix through the same template. A new installer test checks the query in the built Fabric, Azure and Agent Evaluator models.tests/test_consolidated_release.pypins the DataModelSchema hashes of the two core templates, so the two pins are updated, as Power BI model: faster active-user counts, synced from ValueLens #132 did. Main's templates still give the old pins, so the new ones reflect only this change.Organization, the Workday load adds one, fromJob_Family_Groupor null. That's the notebook on Fabric and its port,valuelens_core.workday, on Azure. So a standalone export withDepartmentfailed too. It now refreshes, andOrganizationkeeps the Workday load's value rather than takingDepartment.The wording. Workday only adds columns, and nothing suggests it any more to people without a department.
installer/src/uploads.js) and the Workday pipeline activity (installer/src/transform/pipeline.js) said it "adds or overrides" org fields. They now say it adds the columns the org data doesn't have, and doesn't change or fill in existing ones. The department check after the first load (installer/src/steps/run.js) no longer suggests Workday.core/valuelens_core/org.pyand its copy infabric/notebooks/Copilot_Org_Data_Direct_Ingester.ipynbno longer suggest Workday. The two stay identical.DEPARTMENT_ADVICEand the by-organization empty state (app/src/lib/department-coverage.ts) no longer suggest Workday.docs/DATA-DICTIONARY.mdsays the rename happens only without anOrganizationcolumn, and that Workday doesn't fill in a missing department.CHANGELOG.md: two entries under## Unreleased.tests/test_valuelens_core_collectors.py,installer/test/steps.test.jsandapp/src/lib/department-coverage.spec.ts.Scope
Parts affected (installer / app / Fabric notebooks and pipeline / Azure infra, jobs or web / core / Power BI models): Power BI models (3 templates); installer (wording, plus a test); app (wording); Fabric notebooks and pipeline (one message, one activity description); core (one message); docs.
Source contracts, optional inputs, install record or deployed item names changed: none. The Workday export format, the
copilot_org_datacolumns and every deployed item name are unchanged. Only the description text of the Workday pipeline activity changes.Validation
python -B -m pytest tests -qand recorded results below.npm test(andnpm run typecheckfor the installer) in each changed Node project..pbitfiles changed, documented the rebuild method and Desktop refresh / visual checks.Results, skipped checks and limitations:
python -B -m pytest tests -q -p no:cacheproviderat the repo root: 1,068 passed, 1 failed, 5 skipped, 12,168 subtests passed. That took 27 minutes on this shared machine.tests/test_consolidated_release.py), which caught the template change as intended.a2b45ce,python -B -m pytest tests/test_consolidated_release.py -q -p no:cacheproviderpasses (3 passed). Soa2b45ceis 1,069 passed, the same as its CI run.a2b45ce: 317 passed, 12,048 subtests passed.npm testininstaller/, on the branch rebased ontob902e58: 941 of 944 passed. None of the 3 failures involves this PR's changes:test/script.test.js:115, the known local failure: this machine's execution policy blocksgenerate.ps1. I didn't bypass it. CI skips this test, because it needs Windows PowerShell and cmd.exe.exitWhenDonetests intest/helpers.test.js(lines 154 and 174) timed out because the CPU was at 100%. They give a child Node process 15 or 20 seconds to exit; run directly, it exits with the expected code in 3 to 5 seconds. They testsrc/auth.js, which this PR doesn't touch, and they passed here before the rebase ontob902e58(908 of 909). In CI onfd6187dthey pass in 1.8 and 3.3 seconds.npm run typecheckininstaller/: passed.app/:npm cifails on this machine because its npm feed returns E404 forcaniuse-lite-1.0.30001816.tgz, and I didn't switch registries.src/lib/department-coverage.spec.tsunder Node 24's type stripping with a minimal vitest shim: 7 passed. As a check, the new spec against main'sdepartment-coverage.tsfails exactly the 2 changed assertions.src/screens/executive/attention-stage.spec.tsx:124still matches the new text.tsc -bandbuild:fabricweren't run locally. CI's app job runs them all.0fdad40.CHANGELOG.md. It also changed nothing thattests/test_consolidated_release.py,tests/test_org_department_rename.pyor the app spec reads.b902e58, such as App: count agents in use and people with an organization at once, so the Executive summary loads sooner #139's measure tests and Azure: tell the app which modules are off, so it skips their checks #143's ARM template and Azure infra. CI onfd6187dran both suites, below.fd6187d: all green.npm run typecheck.department-coverage.spec.ts(7) andattention-stage.spec.tsx(5).tsc -bandbuild:fabric: passed.tests/test_org_department_rename.py(5 tests, passing). They check that the templates are current, that every copy of the query has the guard, and that the script covers every template with the rename. They also run the rename steps of each template's M through the repo's M evaluator (tests/m_eval.py), with stub Table functions that fail on a rename onto an existing column, as Power Query does:Departmentonly: renamed toOrganization;Organization;installer/test/model.test.js: the Fabric, Azure and Agent Evaluator models the installer builds all have the guard (passing).python scripts/Update-Org-Department-Rename.pypatches the templates in place, and--checkexits 1 if any is stale. It's idempotent. It edits only the org query, in DataModelSchema and (when the template has one) UnappliedChanges, and it refuses to write if any other model field or ZIP member would change. The Agent Evaluator'slastLoadedAsTableFormulaTextalready differed from its query, so it's left as it is: the script updates it only when it matched, asscripts/Update-Model-Refresh-Fixes.pydoes.ValueLens - Fabric.pbitagainst a lakehouse whosecopilot_org_datahas bothOrganizationandDepartment, for example after a pipeline run with a Workday export that has aDepartmentcolumn. Refresh. It succeeds, and Organization matchescopilot_org_data.Organization.copilot_org_datawithDepartmentand noOrganization, and refresh. It succeeds, and the Department values show as Organization.Departmentcolumn. The model refresh succeeds.Compatibility
Repair or change redeploys the semantic model from the patched template on both Fabric and Azure. The definition's hash is part of the deployed model's signature (
installer/src/steps/model.js), so existing installs pick up the fix with no migration. An Azure org table that already has aDepartmentcolumn refreshes again, without dropping the column.Org data without a
Departmentcolumn, or withDepartmentand noOrganization, behaves exactly as before.Existing Fabric pipelines keep the Workday activity's old description until their next pipeline update. That's the installer's Update, which always offers to replace the pipeline, or a Repair or change that changes what the pipeline runs, such as turning Workday on or off. New installs get the new text.
pipelineSignature(installer/src/steps/fabric.js) is built from the modules, flags and model IDs, not from activity text, andPIPELINE_VERSION(7) isn't bumped.Left unchanged on purpose:
OrganizationfromDepartment(option a+);Consumption Central - Fabric.pbit, which has no rename;The ValueLens templates need a matching change. That's a follow-up, not part of this PR. On ValueLens
main, the same unguarded rename is in:1. Fabric/Manual setup/ValueLens - Fabric.pbit,ValueLens - Fabric OneLake.pbitandAdd Agent Evaluator/Agent Evaluator.pbit;ValueLens - Power Automate + Dataverse.pbit;ValueLens - SharePoint.pbit;ValueLens - Local CSV.pbit.Its Consumption Central templates have none. Those variants have no Workday load, but org data with both columns would fail the same way. The patch script here has this repo's paths only.
Overlaps with open PRs
This branch is rebased onto main
0fdad40, which also has #142, #138, #139 and #143, merged sincea2b45ce. OnlyCHANGELOG.mdchanged, by main's new entries; the code is byte-identical toa2b45ce. The survey of open PRs below was made ata2b45ce, while those four were still open. Main already had #141 (Azure: Workday org data by CSV) and #126, both merged after this was planned.Departmentspecial case, so this model fix covers it as it is.azure/README.md, that the export "doesn't fill in a missing department", agrees with this fix.I checked every open PR with
gh pr diff <n> --name-only. None touches a.pbitfile, and the only file any of them shares with this PR isCHANGELOG.md.CHANGELOG.mdonly: Azure: tell the app which modules are off, so it skips their checks #143, App: preload the start-up code, so it downloads while the config loads #142, Azure: Agent Evaluator model on Azure SQL, with org-scoped access (W2, 2 of 3) #140, App: count agents in use and people with an organization at once, so the Executive summary loads sooner #139, App: the Executive summary's headline figures don't wait for saved task times #138, Azure: Agent Evaluator jobs collector, parser and V008 (W2, 1 of 3) #133, Installer: recommend Azure and start new installs on it #128, Add an Azure by-hand setup path #115 and Managed app: one command sets it up by hand #114 (draft). Each appends to## Unreleased.git merge-tree --write-tree),CHANGELOG.mdincluded:3d7e3bc), App: preload the start-up code, so it downloads while the config loads #142 (84c0e27), Bump the github-actions group with 3 updates #135, Bump the npm group across 2 directories with 7 updates #134 and Bump python from 3.12-slim-bookworm to 3.14-slim-bookworm in /azure/jobs #45. Also clean: App: preload the start-up code, so it downloads while the config loads #142 with App: the Executive summary's headline figures don't wait for saved task times #138 and App: count agents in use and people with an organization at once, so the Executive summary loads sooner #139 rebased on top of it (ce04d01, a local stack that isn't pushed).CHANGELOG.mdconflicts after their rebase, keep both.buildAgentEvaluatorModelfromAgent Evaluator.pbit, so it picks up this fix. Neither PR needs a change for the other.buildAgentEvaluatorModel,loadTemplateModelorbuildModel, the installer'stest/fakes.js,installer/test/model.test.jsor any.pbit. So this PR's new installer test still holds after they rebase.Please don't merge. Keith OKs the merge separately, and it lands before rc.1.