Improve reporting: fix existing totals and evaluate new reports
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 15/100
Línea de trabajo
This is a planning issue, so agree on the scope before writing code. Start with the summary report actions in Purchasing.Mvc/Controllers/ReportController.cs and the search and aggregation queries in Purchasing.Core/Services/IndexSearchService.cs, which show where the 1,000-order cap applies. Done means full-dataset totals match SQL for sample data, exports cover the whole dataset, and workgroup scope is enforced server-side.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
People report that Purchasing's reporting is limited, but we need to turn that feedback into specific improvements. Start by making existing totals trustworthy, then choose useful additional reports with clear definitions and practical permission scopes.
Keep this as one planning issue for now. New reports below are candidates to discuss, not a committed delivery list. Do not create subissues until we have agreed on the work.
The maintainer reports that the system has run in its current form for roughly a decade, serving thousands of daily users with essentially no operational issues. Preserve that stability. Query changes, small reliability improvements, and an additional reporting index are reasonable options where they solve a concrete need.
Fixing existing totals is the first implementation priority.
The workgroup, primary-organization, and vendor summary reports currently fetch at most 1,000 matching orders from Elasticsearch and count those returned rows in application code. A warning appears at the limit, but the displayed totals can still be incomplete.
- Calculate totals over the full authorized matching dataset, using SQL aggregation or Elasticsearch aggregation.
- Clearly define the date basis. Current summaries show the current status of orders created during the selected period; that is different from orders completed during the period.
- Make entered date ranges behave consistently, including the entire selected end date.
- Use consistent outcome definitions. Successful completion should distinguish
CP/CNfrom canceled and denied orders;IsCompletealone includes all of these. - Decide how historical reports include inactive workgroups and how administrative rollups are displayed without suggesting that overlapping parent/child rows can be summed.
- Make export coverage explicit and consistent with the report. A spreadsheet containing only the displayed 1,000 rows is not a complete dataset.
- Verify representative totals against SQL and check report scope enforcement, including workgroup IDs supplied through query parameters.
These fixes should not depend on redesigning the indexing pipeline.
The following new reports look useful. Select the initial set and agree on definitions here before implementation.
| Candidate | Useful result | Likely data/access approach and decisions |
|---|---|---|
| Department backlog and aging | Open orders by workgroup/status, age buckets, past-needed-date orders, and orders with no recent activity | Workgroup-scoped order data. Distinguish order age, time since last activity, and time in the current stage. The first two are simpler. |
| Monthly request volume and outcomes | Demand and completion/cancellation trends | Creation-month/current-status reporting is straightforward. Completion-month throughput needs tracking events or a completion-date projection and a definition for reopened/recompleted orders. |
| Receiving and AP follow-up | Completed orders still unreceived, partially received, or marked unpaid, grouped by workgroup or AP assignee | Existing order/line data and AP assignment. These are Purchasing's recorded receipt/payment states, not verified financial-system settlement. Discuss how canceled or otherwise resolved items leave the follow-up list. |
| Permission maintenance | Inactive members, inactive conditional approvers, missing conditional alternates, and account assignments needing review | SQL configuration data. Include conditional-only assignments in user views. A null named approver can intentionally mean a workgroup pool, so it is not automatically a configuration error. |
| My requests | Requests I created, their status, age, needed date, and receiving progress | Creator-based scope may avoid enumerating every order the user can otherwise access. |
| Account/project allocation | Requested amounts by account or chartstring | A later candidate requiring more discussion. Use structured splits and allocated amounts, avoid counting the whole order against every split, and define cross-department access. |
Permissions should follow the question the report answers. Existing management reports mostly resolve the departmental admin's organizations into authorized workgroups. This is much simpler than calculating every order a person can approve.
- Department totals and backlog can use an authorized workgroup scope without reproducing all conditional-approver, away/backup, and ad hoc routing rules.
- Creator and AP-assignee scopes can support focused personal reports.
- Consider a separate read-only reporting role if managers or purchasers need broader reporting without departmental administration or approval authority. The audience and scope still need agreement.
- “Which orders can I see?” and “Who can act next?” require the existing order-level access rules. A future “who has access, and why?” diagnostic should reuse those rules.
- Order-owning workgroup, primary organization, and account-funding organization are different dimensions. Agree on which one each report represents.
- Validate report scope on the server. Aggregate visibility, detailed order visibility, and permission to act are separate decisions.
Use Elasticsearch where it helps, with targeted improvements when justified. Most summary/timing reports already use it. SQL remains useful for current routing, permissions, and structured account splits. Simple workgroup-scoped SQL reporting does not necessarily need the expensive per-user order-access functions.
Source review raised questions about the indexer's ten-minute lookback, behavior when an update spans multiple 1,000-order batches, and unchecked bulk results. These are investigation topics, not evidence that production is routinely losing data or having outages. Evaluate actual impact before changing established behavior. Small error checks, clearer freshness information, focused update-logic fixes, or a separate reporting projection/index are options to discuss if needed. A broad migration or indexing rewrite is not required for this reporting work.
If adding Elasticsearch aggregations, apply the authorized scope to the aggregation query itself. The existing history query uses post_filter for allowed order IDs, which filters returned rows but does not restrict aggregation results.
Current reporting inventory and source findings
All eight Reports-menu entries require departmental-admin access.
| Existing report | Source | Main limitations |
|---|---|---|
| Purchaser Daily Workload | SQL OrderTracking and vOrderHistory |
Selected-day completion events plus current pending orders, not historical backlog. Text-based event matching and purchaser display-name matching complicate attribution. |
| Purchaser Processing Time by Workgroup | opp-orderhistory plus individual SQL order/tracking reads |
Creation-month cohort; defaults to rerouted orders; 1,000-order cap before further filtering; uses the last reroute and parses event descriptions. |
| Processing Time by Workgroup | opp-ordertracking |
Full-set indexed averages, but at most 1,000 detail/treemap records. Includes canceled/denied through IsComplete. Selecting an administrative workgroup does not expand its children. |
| Processing Time by Role | opp-ordertracking aggregations |
One selected actor per role, no separate conditional-approval timing, default top-ten person buckets, and 1,000 detail rows. |
| Permissions | SQL permissions, users, conditional-approval definitions | Workgroup view includes conditional primary/secondary approvers. User view omits conditional-only assignments. It does not explain effective access to an individual order. |
| Order Summary by Workgroup | opp-orderhistory plus SQL metadata |
Counts fetched rows up to 1,000. Inactive workgroups and inheritance rules affect coverage; parent/child rows overlap. |
| Order Summary by Primary Organization | Same | Same cap; attribution uses the workgroup's current primary organization rather than funding splits or historical organization. |
| Order Summary by Vendor | Same | Same cap; vendor display strings include address information and can fragment a supplier into multiple groups. Reports order counts rather than spending. |
Other reporting includes order history/admin/AP lists with exports, a Workload endpoint absent from the Reports menu, single-order PDFs, and an overall statistics endpoint. History lists return at most 1,000 displayed rows. The older Workload view has no date filter and joins historical activity to current membership.
The timing index flattens events into one order record with selected approver/account-manager/purchaser actors and elapsed calendar durations. It cannot fully explain conditional approvals, repeated approvals, handoffs, or time spent waiting. Avoid treating these durations as individual labor or performance measures without discussing their meaning.
The current Aggie Enterprise financial-officer lookup returns no officer and IsExternal = false. A new external-account report cannot rely on that flag alone. Account classification and legacy/current routing behavior need discussion.
Sources reviewed at 685bc30:
- Report controller
- Search and aggregation queries
- Workgroup reporting scope
- Workgroup authorization attribute
- Indexer and timing projection
- Permissions display
- Aggie Enterprise financial-officer lookup
- Elasticsearch aggregation filtering
These are source-level findings. Production completeness, query performance, and the frequency or impact of indexing edge cases have not been measured in this assessment.
Existing requests provide useful background and remain separate:
- #375: department reporting for unreceived and partially received orders.
- #354: receiving, payment, and days-without-activity reporting.
- #413: resolving follow-up without falsely marking canceled/unfulfilled items received.
- #301: monthly/custom-date purchaser workload.
- #453: supervisor workload delivery and a possible weekly view.
- Lenguaje dominante
- C#
- Estrellas
- 7
- Forks
- 5
- Merge medio
- 9 h 3 min
- PR fusionados (30 d)
- 5
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ucdavis/Purchasing
-
remove elmahAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
ucdavis/Purchasing#436 ·
-
Refactor configsPosiblemente ocupada @jSylvestre la tomó hace 10 días. Abierto
ucdavis/Purchasing#683 · 1 asignado ·
-
Add local resumable search backfill and verification runnerPosiblemente ocupada @srkirkland la tomó hace 24 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
ucdavis/Purchasing#678 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
ucdavis/Purchasing#677 ·
-
AE API field length issueQuizá libre de nuevo @jSylvestre la tomó hace 39 días y no hay ningún pull request abierto. Abierto
ucdavis/Purchasing#665 · 1 asignado ·
Todos los issues de ucdavis/Purchasing
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Bug IronPython Python 3
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pyrevitlabs/pyRevit#4184 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
yusei36/KeePassPasskey#66 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
🐛 bug 🕒 low effort good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
guibranco/Sankhya-SDK-dotnet#654 ·
Los mantenedores suelen responder en 1 día
-
巫女のセリフに声を付けるAbiertoassets claude-proposal
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Fialuxe/MouthOfGod_System#358 ·
Los mantenedores suelen responder en 1 día