Skip to content

SuggestionsController

  • Namespace: Insorce.Controllers
  • Project: Andromeda.Web

Overview

The SuggestionsController manages features related to actor-based suggestions, scheduling, business rules retrieval, and team member activity management within project contexts.

Feature Summary

  • Provides actor filtering, ordering, and display of processed actor lists.
  • Retrieves business rules filtered by actor and grouped by organizational units, products, or clusters.
  • Generates project-related schedules, Gantt charts, cost analyses, and manages deadlines and team suggestions.
  • Supports retrieval and update of team member activity records and availability assessments.
  • Offers endpoints to refresh custom schedules and retrieve detailed scheduling data by actor.
  • Delivers multiple views including Process, Locations, Controls, HR, and Infra for user interaction.

UX Summary

  • Displays processed actor lists and project schedules to users via dedicated views.
  • Returns JSON data for business rules and scheduling to support dynamic UI components.
  • User experience is influenced by the clarity of method naming, error messaging, and response sizes.
  • Views such as Controls, HR, and Infra shape user interaction with static or dynamic content.
  • Potential UX degradation due to hardcoded error messages and large JSON payloads.

Data Dependencies

  • Relies on data repositories or services to retrieve actors, business rules, project activities, and team member records.
  • Reads and writes CSV files for schedule and team member record management.
  • Accesses configuration data directly for schedule generation and deadline management.
  • Processes data grouping by units, products, clusters, and time intervals for scheduling and business rules.

Authentication / Authorization Notes

  • No explicit authentication or permission checks are detailed in the methods.
  • Input validation and sanitization are critical to prevent security risks such as SQL injection and path traversal.
  • Methods handling file operations and data updates require careful access control to avoid unauthorized modifications.

Controller Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_Clone["Andromeda.Core.Entities.Activity.Clone"]
    Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkEndTimeInProjectZone"]
    Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone"]
    Andromeda_Core_Entities_Gantt_ActorGantt["Andromeda.Core.Entities.Gantt.ActorGantt"]
    Andromeda_Core_Entities_Gantt_ActorGanttByUnits["Andromeda.Core.Entities.Gantt.ActorGanttByUnits"]
    Andromeda_Core_Entities_Gantt_ClusterGantt["Andromeda.Core.Entities.Gantt.ClusterGantt"]
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor["Andromeda.Core.Entities.Gantt.HourlyEffortByActor"]
    Andromeda_Core_Entities_Gantt_ProductGantt["Andromeda.Core.Entities.Gantt.ProductGantt"]
    Andromeda_Core_Entities_Sched_EndTimeHourMin["Andromeda.Core.Entities.Sched.EndTimeHourMin"]
    Andromeda_Core_Entities_Sched_GetHourEffort["Andromeda.Core.Entities.Sched.GetHourEffort"]
    Andromeda_Core_Entities_Sched_StartTimeHour["Andromeda.Core.Entities.Sched.StartTimeHour"]
    Andromeda_Core_Entities_Sched_StartTimeHourMin["Andromeda.Core.Entities.Sched.StartTimeHourMin"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    Andromeda_Core_Services_ActivitySchedule_IsAvailable["Andromeda.Core.Services.ActivitySchedule.IsAvailable"]
    Andromeda_Core_Services_ActivitySchedule_IsScheduled["Andromeda.Core.Services.ActivitySchedule.IsScheduled"]
    Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows["Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop["Andromeda.Core.Services.Algorithms.Delooper.deloop"]
    Andromeda_Core_Services_AsyncProcessManager_ErrorInProcess["Andromeda.Core.Services.AsyncProcessManager.ErrorInProcess"]
    Andromeda_Core_Services_AsyncProcessManager_FinalizeProcess["Andromeda.Core.Services.AsyncProcessManager.FinalizeProcess"]
    Andromeda_Core_Services_AsyncProcessManager_GetProcessorDetail["Andromeda.Core.Services.AsyncProcessManager.GetProcessorDetail"]
    Andromeda_Core_Services_AsyncProcessManager_StopProcessor["Andromeda.Core.Services.AsyncProcessManager.StopProcessor"]
    Andromeda_Core_Services_AsyncProcessorDetail_End["Andromeda.Core.Services.AsyncProcessorDetail.End"]
    Andromeda_Core_Services_AsyncProcessorDetail_ExecuteErrorEvent["Andromeda.Core.Services.AsyncProcessorDetail.ExecuteErrorEvent"]
    Andromeda_Core_Services_AsyncProcessorDetail_UpdateStatusText["Andromeda.Core.Services.AsyncProcessorDetail.UpdateStatusText"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    Andromeda_Core_Services_ScheduleOptimizer_RunSchedule["Andromeda.Core.Services.ScheduleOptimizer.RunSchedule"]
    Andromeda_Core_Services_SignalRMsg_SendMessage["Andromeda.Core.Services.SignalRMsg.SendMessage"]
    Andromeda_Core_Services_TimeRange_Overlaps["Andromeda.Core.Services.TimeRange.Overlaps"]
    SuggestionsController_Controls["SuggestionsController.Controls"]
    SuggestionsController_GetSchedDataByActor["SuggestionsController.GetSchedDataByActor"]
    SuggestionsController_GetTeamMemberRecords["SuggestionsController.GetTeamMemberRecords"]
    SuggestionsController_Locations["SuggestionsController.Locations"]
    SuggestionsController_Process["SuggestionsController.Process"]
    SuggestionsController_UpdateTeamMemberRecords["SuggestionsController.UpdateTeamMemberRecords"]
    Andromeda_Core_Entities_Gantt_ActorGanttByUnits --> Andromeda_Core_Entities_Sched_StartTimeHourMin
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor --> Andromeda_Core_Entities_Sched_GetHourEffort
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor --> Andromeda_Core_Entities_Sched_StartTimeHour
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    Andromeda_Core_Services_AsyncProcessManager_ErrorInProcess --> Andromeda_Core_Services_AsyncProcessorDetail_ExecuteErrorEvent
    Andromeda_Core_Services_AsyncProcessManager_FinalizeProcess --> Andromeda_Core_Services_AsyncProcessorDetail_End
    Andromeda_Core_Services_ScheduleOptimizer_RunSchedule --> Andromeda_Core_LoggingManager_Info
    Andromeda_Core_Services_ScheduleOptimizer_RunSchedule --> Andromeda_Core_Services_ActivitySchedule_IsAvailable
    Andromeda_Core_Services_ScheduleOptimizer_RunSchedule --> Andromeda_Core_Services_ActivitySchedule_IsScheduled
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Info
    SuggestionsController_Controls --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    SuggestionsController_Controls --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    SuggestionsController_Controls --> Andromeda_Core_Services_ProcessExtensions_FindByID
    SuggestionsController_GetSchedDataByActor --> Andromeda_Core_Entities_Sched_EndTimeHourMin
    SuggestionsController_GetSchedDataByActor --> Andromeda_Core_Entities_Sched_StartTimeHour
    SuggestionsController_GetSchedDataByActor --> Andromeda_Core_Entities_Sched_StartTimeHourMin
    SuggestionsController_GetSchedDataByActor --> Andromeda_Core_Services_TimeRange_Overlaps
    SuggestionsController_GetTeamMemberRecords --> Andromeda_Core_Entities_Sched_EndTimeHourMin
    SuggestionsController_GetTeamMemberRecords --> Andromeda_Core_Entities_Sched_StartTimeHour
    SuggestionsController_GetTeamMemberRecords --> Andromeda_Core_Entities_Sched_StartTimeHourMin
    SuggestionsController_GetTeamMemberRecords --> Andromeda_Core_Services_TimeRange_Overlaps
    SuggestionsController_Locations --> Andromeda_Core_Entities_Activity_Clone
    SuggestionsController_Locations --> Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone
    SuggestionsController_Locations --> Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone
    SuggestionsController_Locations --> Andromeda_Core_Entities_Gantt_ActorGantt
    SuggestionsController_Locations --> Andromeda_Core_Entities_Gantt_ActorGanttByUnits
    SuggestionsController_Locations --> Andromeda_Core_Entities_Gantt_ClusterGantt
    SuggestionsController_Locations --> Andromeda_Core_Entities_Gantt_HourlyEffortByActor
    SuggestionsController_Locations --> Andromeda_Core_Entities_Gantt_ProductGantt
    SuggestionsController_Locations --> Andromeda_Core_Entities_Sched_StartTimeHour
    SuggestionsController_Process --> Andromeda_Core_LoggingManager_Debug
    SuggestionsController_Process --> Andromeda_Core_LoggingManager_Error
    SuggestionsController_Process --> Andromeda_Core_Services_AsyncProcessManager_ErrorInProcess
    SuggestionsController_Process --> Andromeda_Core_Services_AsyncProcessManager_FinalizeProcess
    SuggestionsController_Process --> Andromeda_Core_Services_AsyncProcessManager_GetProcessorDetail
    SuggestionsController_Process --> Andromeda_Core_Services_AsyncProcessManager_StopProcessor
    SuggestionsController_Process --> Andromeda_Core_Services_AsyncProcessorDetail_UpdateStatusText
    SuggestionsController_Process --> Andromeda_Core_Services_ScheduleOptimizer_RunSchedule
    SuggestionsController_Process --> Andromeda_Core_Services_SignalRMsg_SendMessage
    SuggestionsController_UpdateTeamMemberRecords --> Andromeda_Core_LoggingManager_Error

System Dependencies

Incoming Dependencies (Fan-In): None

Outgoing Dependencies (Fan-Out): None

Cycle Detection

No dependency cycles detected for this controller.

View → Action Mapping

Action View Model Path
controls Controls - Andromeda.Web\Views\Suggestions\Controls.cshtml
hr HR - Andromeda.Web\Views\Suggestions\HR.cshtml
index Index IList<Andromeda.Core.Entities.CustomWidgetView> Andromeda.Web\Views\Suggestions\Index.cshtml
infra Infra - Andromeda.Web\Views\Suggestions\Infra.cshtml
locations Locations - Andromeda.Web\Views\Suggestions\Locations.cshtml
process Process - Andromeda.Web\Views\Suggestions\Process.cshtml

Methods at a Glance

File & Import Operations

Type Method HTTP URL Summary
entrypoint RefreshCustomSched GET /Suggestions/RefreshCustomSched RefreshCustomSched copies sched.csv to Customsched.csv and returns success...
entrypoint UpdateTeamMemberRecords POST /Suggestions/UpdateTeamMemberRecords UpdateTeamMemberRecords reads CSV data, updates matching rows with member info...

Query & View Methods

Type Method HTTP URL Summary
entrypoint GetTeamMemberRecords GET /Suggestions/GetTeamMemberRecords Retrieve and filter team activities by actor ID to assess member availability...
entrypoint Infra `` /Suggestions/Infra The method executes and returns a View directly to the caller.

Validation & Rules

Type Method HTTP URL Summary
entrypoint GetBRulesByActor GET /Suggestions/GetBRulesByActor Retrieve business rules filtered by actor and grouped by units, products, or...
entrypoint GetSchedDataByActor GET /Suggestions/GetSchedDataByActor Retrieve and filter project activities by actor, group by unit and time, check...

Workflow & Routing

Type Method HTTP URL Summary
entrypoint Process `` /Suggestions/Process Retrieve, filter, order actors, convert to list, and return in a view.
entrypoint Locations `` /Suggestions/Locations Retrieve and process project data to generate schedules, Gantt charts, cost...

Other Methods

Type Method HTTP URL Summary
entrypoint Controls `` /Suggestions/Controls No key flows are defined in the Controls method.
entrypoint HR `` /Suggestions/HR No key flows are defined in the HR method section.

Associated Screens / Views

  • ProcessProcess (Andromeda.Web\Views\Suggestions\Process.cshtml)
  • LocationsLocations (Andromeda.Web\Views\Suggestions\Locations.cshtml)
  • ControlsControls (Andromeda.Web\Views\Suggestions\Controls.cshtml)
  • HRHR (Andromeda.Web\Views\Suggestions\HR.cshtml)
  • InfraInfra (Andromeda.Web\Views\Suggestions\Infra.cshtml)

Entrypoint Methods

Process

Summary: Retrieve, filter, order actors, convert to list, and return in a view.

ActionResult SuggestionsController.Process()

Routing

  • URL: /Suggestions/Process

Cross-layer call chain - SuggestionsController.Process → Andromeda.Core.Services.AsyncProcessorDetail.UpdateStatusText - SuggestionsController.Process → Andromeda.Core.Services.AsyncProcessManager.GetProcessorDetail - SuggestionsController.Process → Andromeda.Core.Services.SignalRMsg.SendMessage - SuggestionsController.Process → Andromeda.Core.LoggingManager.Debug - SuggestionsController.Process → Andromeda.Core.LoggingManager.Error - SuggestionsController.Process → Andromeda.Core.Services.AsyncProcessManager.FinalizeProcess - SuggestionsController.Process → Andromeda.Core.Services.AsyncProcessManager.ErrorInProcess - SuggestionsController.Process → Andromeda.Core.Services.ScheduleOptimizer.RunSchedule - SuggestionsController.Process → Andromeda.Core.Services.AsyncProcessManager.StopProcessor - Andromeda.Core.Services.SignalRMsg.SendMessage → Andromeda.Core.LoggingManager.Info - Andromeda.Core.Services.SignalRMsg.SendMessage → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.AsyncProcessManager.FinalizeProcess → Andromeda.Core.Services.AsyncProcessorDetail.End - Andromeda.Core.Services.AsyncProcessManager.ErrorInProcess → Andromeda.Core.Services.AsyncProcessorDetail.ExecuteErrorEvent - Andromeda.Core.Services.ScheduleOptimizer.RunSchedule → Andromeda.Core.Services.ActivitySchedule.IsAvailable - Andromeda.Core.Services.ScheduleOptimizer.RunSchedule → Andromeda.Core.Services.ActivitySchedule.IsScheduled - Andromeda.Core.Services.ScheduleOptimizer.RunSchedule → Andromeda.Core.LoggingManager.Info

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    Andromeda_Core_Services_ActivitySchedule_IsAvailable["Andromeda.Core.Services.ActivitySchedule.IsAvailable"]
    Andromeda_Core_Services_ActivitySchedule_IsScheduled["Andromeda.Core.Services.ActivitySchedule.IsScheduled"]
    Andromeda_Core_Services_AsyncProcessManager_ErrorInProcess["Andromeda.Core.Services.AsyncProcessManager.ErrorInProcess"]
    Andromeda_Core_Services_AsyncProcessManager_FinalizeProcess["Andromeda.Core.Services.AsyncProcessManager.FinalizeProcess"]
    Andromeda_Core_Services_AsyncProcessManager_GetProcessorDetail["Andromeda.Core.Services.AsyncProcessManager.GetProcessorDetail"]
    Andromeda_Core_Services_AsyncProcessManager_StopProcessor["Andromeda.Core.Services.AsyncProcessManager.StopProcessor"]
    Andromeda_Core_Services_AsyncProcessorDetail_End["Andromeda.Core.Services.AsyncProcessorDetail.End"]
    Andromeda_Core_Services_AsyncProcessorDetail_ExecuteErrorEvent["Andromeda.Core.Services.AsyncProcessorDetail.ExecuteErrorEvent"]
    Andromeda_Core_Services_AsyncProcessorDetail_UpdateStatusText["Andromeda.Core.Services.AsyncProcessorDetail.UpdateStatusText"]
    Andromeda_Core_Services_ScheduleOptimizer_RunSchedule["Andromeda.Core.Services.ScheduleOptimizer.RunSchedule"]
    Andromeda_Core_Services_SignalRMsg_SendMessage["Andromeda.Core.Services.SignalRMsg.SendMessage"]
    SuggestionsController_Process["SuggestionsController.Process"]
    Andromeda_Core_Services_AsyncProcessManager_ErrorInProcess --> Andromeda_Core_Services_AsyncProcessorDetail_ExecuteErrorEvent
    Andromeda_Core_Services_AsyncProcessManager_FinalizeProcess --> Andromeda_Core_Services_AsyncProcessorDetail_End
    Andromeda_Core_Services_ScheduleOptimizer_RunSchedule --> Andromeda_Core_LoggingManager_Info
    Andromeda_Core_Services_ScheduleOptimizer_RunSchedule --> Andromeda_Core_Services_ActivitySchedule_IsAvailable
    Andromeda_Core_Services_ScheduleOptimizer_RunSchedule --> Andromeda_Core_Services_ActivitySchedule_IsScheduled
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Info
    SuggestionsController_Process --> Andromeda_Core_LoggingManager_Debug
    SuggestionsController_Process --> Andromeda_Core_LoggingManager_Error
    SuggestionsController_Process --> Andromeda_Core_Services_AsyncProcessManager_ErrorInProcess
    SuggestionsController_Process --> Andromeda_Core_Services_AsyncProcessManager_FinalizeProcess
    SuggestionsController_Process --> Andromeda_Core_Services_AsyncProcessManager_GetProcessorDetail
    SuggestionsController_Process --> Andromeda_Core_Services_AsyncProcessManager_StopProcessor
    SuggestionsController_Process --> Andromeda_Core_Services_AsyncProcessorDetail_UpdateStatusText
    SuggestionsController_Process --> Andromeda_Core_Services_ScheduleOptimizer_RunSchedule
    SuggestionsController_Process --> Andromeda_Core_Services_SignalRMsg_SendMessage
View Metadata
  • View: Process (Andromeda.Web\Views\Suggestions\Process.cshtml)
Detailed Analysis

Key Flows - and return in a view. - Return view with actor list

Performance Issues - Summary: Retrieving and filtering all actors in memory causes performance issues with large datasets. - In-memory retrieval of all actors, Filtering and ordering actors in memory, Performance degradation with large actor counts

Maintainability Issues - Summary: Rename 'Process' method to clearly reflect its purpose. - Generic method name 'Process', Unclear method purpose

UX Impact Notes - Summary: Display processed actor list to the user. - Processed actor list view

Test Case Ideas - Summary: Verify correct view rendering, accurate actor filtering and ordering, and performance with many actors. - Performance with large actor sets

Dependencies & Called Services - Summary: Uses Enumerable for collection operations and IActorModel for actor interactions. - Enumerable for collection processing, IActorModel for actor interface

GetBRulesByActor

Summary: Retrieve business rules filtered by actor and grouped by units, products, or clusters, then return as JSON.

JsonResult SuggestionsController.GetBRulesByActor(int? ProjID, int? actorID, string chkele)

Routing

  • HTTP: GET
  • URL: /Suggestions/GetBRulesByActor
Detailed Analysis

Key Flows - then return as JSON. - Return grouped business rules as JSON

Error Flows - Summary: Handle null ProjID and actorID to prevent null reference exceptions. - Null reference exceptions from accessing ProjID or actorID Value when null, Incomplete code segments causing runtime errors or unexpected behavior

Security Issues - Summary: Incomplete code causes runtime errors, risking security and stability. - Incomplete or undefined code causing runtime errors

Performance Issues - Summary: Multiple LINQ queries and database calls degrade performance on large data sets. - Multiple LINQ queries and database calls impact performance on large data sets

Maintainability Issues - Summary: The method's complexity and anonymous types reduce maintainability and clarity. - High complexity from multiple LINQ queries and database calls, Extensive use of anonymous types reducing code clarity, Incomplete or truncated code segments complicating understanding

UX Impact Notes - Summary: Correct and well-formatted JSON data ensures smooth user experience and interface reliability. - Correctness and formatting of returned JSON data

Test Case Ideas - Summary: Verify filtering, grouping, conditions, performance, and output correctness in GetBRulesByActor. - Performance with large data sets and LINQ queries

Dependencies & Called Services - Summary: Uses models and enumerable collections for actor and control data processing. - Enumerable collections, Actor model interface, Control model interface, HR model interface

Locations

Summary: Retrieve and process project data to generate schedules, Gantt charts, cost analyses, and manage deadlines and team suggestions.

ActionResult SuggestionsController.Locations()

Routing

  • URL: /Suggestions/Locations

Cross-layer call chain - SuggestionsController.Locations → Andromeda.Core.Entities.Activity.Clone - SuggestionsController.Locations → Andromeda.Core.Entities.Gantt.ActorGantt - SuggestionsController.Locations → Andromeda.Core.Entities.Gantt.ClusterGantt - SuggestionsController.Locations → Andromeda.Core.Entities.Gantt.ProductGantt - SuggestionsController.Locations → Andromeda.Core.Entities.Gantt.ActorGanttByUnits - SuggestionsController.Locations → Andromeda.Core.Entities.Gantt.HourlyEffortByActor - SuggestionsController.Locations → Andromeda.Core.Entities.Sched.StartTimeHour - SuggestionsController.Locations → Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone - SuggestionsController.Locations → Andromeda.Core.Entities.Actor.WorkEndTimeInProjectZone - Andromeda.Core.Entities.Gantt.ActorGanttByUnits → Andromeda.Core.Entities.Sched.StartTimeHourMin - Andromeda.Core.Entities.Gantt.HourlyEffortByActor → Andromeda.Core.Entities.Sched.GetHourEffort - Andromeda.Core.Entities.Gantt.HourlyEffortByActor → Andromeda.Core.Entities.Sched.StartTimeHour

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_Clone["Andromeda.Core.Entities.Activity.Clone"]
    Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkEndTimeInProjectZone"]
    Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone"]
    Andromeda_Core_Entities_Gantt_ActorGantt["Andromeda.Core.Entities.Gantt.ActorGantt"]
    Andromeda_Core_Entities_Gantt_ActorGanttByUnits["Andromeda.Core.Entities.Gantt.ActorGanttByUnits"]
    Andromeda_Core_Entities_Gantt_ClusterGantt["Andromeda.Core.Entities.Gantt.ClusterGantt"]
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor["Andromeda.Core.Entities.Gantt.HourlyEffortByActor"]
    Andromeda_Core_Entities_Gantt_ProductGantt["Andromeda.Core.Entities.Gantt.ProductGantt"]
    Andromeda_Core_Entities_Sched_GetHourEffort["Andromeda.Core.Entities.Sched.GetHourEffort"]
    Andromeda_Core_Entities_Sched_StartTimeHour["Andromeda.Core.Entities.Sched.StartTimeHour"]
    Andromeda_Core_Entities_Sched_StartTimeHourMin["Andromeda.Core.Entities.Sched.StartTimeHourMin"]
    SuggestionsController_Locations["SuggestionsController.Locations"]
    Andromeda_Core_Entities_Gantt_ActorGanttByUnits --> Andromeda_Core_Entities_Sched_StartTimeHourMin
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor --> Andromeda_Core_Entities_Sched_GetHourEffort
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor --> Andromeda_Core_Entities_Sched_StartTimeHour
    SuggestionsController_Locations --> Andromeda_Core_Entities_Activity_Clone
    SuggestionsController_Locations --> Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone
    SuggestionsController_Locations --> Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone
    SuggestionsController_Locations --> Andromeda_Core_Entities_Gantt_ActorGantt
    SuggestionsController_Locations --> Andromeda_Core_Entities_Gantt_ActorGanttByUnits
    SuggestionsController_Locations --> Andromeda_Core_Entities_Gantt_ClusterGantt
    SuggestionsController_Locations --> Andromeda_Core_Entities_Gantt_HourlyEffortByActor
    SuggestionsController_Locations --> Andromeda_Core_Entities_Gantt_ProductGantt
    SuggestionsController_Locations --> Andromeda_Core_Entities_Sched_StartTimeHour
View Metadata
  • View: Locations (Andromeda.Web\Views\Suggestions\Locations.cshtml)
Detailed Analysis

Key Flows - Summary: Retrieve and process project data to generate schedules, Gantt charts, cost analyses, and manage deadlines and team suggestions. - Check and copy specific project files conditionally - Process capacity distribution data, group by text IDs, and extract relevant activities and arrows - Retrieve actors, arrows, activities, and initialize scheduling and Gantt objects, Filter active actors and generate multiple Gantt charts and schedule analyses, Perform cost analysis using skill matrices and actor total costs for active non-system actors, Manage deadline activities and retrieve critical paths for filtered activities, Aggregate and filter team and peak activity suggestions with effort and working hours calculations

Error Flows - Summary: Prevent null references, array bounds errors, and file read exceptions. - Null reference exceptions from unchecked object properties - Array index exceptions from unchecked string splits

Security Issues - Summary: Direct access to configuration without validation risks data exposure and injection. - Unvalidated direct access to ConfigurationManager.AppSettings

Performance Issues - Summary: Optimize data handling and reduce redundant operations to improve performance. - Excessive memory use from ToList() and Clone() on large datasets - Repeated ConfigurationManager.AppSettings access in critical paths - Multiple database calls and data processing on large datasets

Maintainability Issues - Summary: Code contains unclear naming, tight coupling, incomplete code, and hard-to-read expressions. - Commented out and incomplete code sections, Use of magic strings and numbers reducing readability, Undescriptive and single-letter variable names, Tight coupling between schedule processing and Gantt chart generation, Complex LINQ queries and lambda expressions, Typographical errors causing compilation issues, Incomplete or syntactically incorrect code snippets

UX Impact Notes - Summary: Generated charts and suggestions influence user data presentation and experience. - Generated Gantt charts and schedule analyses influence user data presentation, Peak activity suggestion ordering affects display to users, Incomplete or erroneous code risks crashes and unexpected behavior

Test Case Ideas - and logic correctness. - Calculate capacity distribution with different schedules and actors - Check file existence with valid - Handle hourly effort data including empty and multiple matches - Verify file copy operations and return values - Test conditional logic with min values and effort hour boundaries - Order and assign peak activity suggestions to ViewBag - Validate LINQ filtering

Dependencies & Called Services - Summary: Uses diverse data types and interfaces for activity tracking and scheduling. - Activity tracking types, Actor and IActorModel interfaces, DateTime for timestamps, Dictionary and IDictionary collections, Enumerable and List collections, File handling, Gantt chart representation, Control and model interfaces (IControlModel, IFinalPlanModel, IHRModel, IInfraModel), Integer and String primitives, Scheduling types (Sched)

GetSchedDataByActor

Summary: Retrieve and filter project activities by actor, group by unit and time, check member availability, and return JSON schedule data.

JsonResult SuggestionsController.GetSchedDataByActor(int? ProjID, int? actorID)

Routing

  • HTTP: GET
  • URL: /Suggestions/GetSchedDataByActor

Cross-layer call chain - SuggestionsController.GetSchedDataByActor → Andromeda.Core.Entities.Sched.StartTimeHour - SuggestionsController.GetSchedDataByActor → Andromeda.Core.Entities.Sched.StartTimeHourMin - SuggestionsController.GetSchedDataByActor → Andromeda.Core.Entities.Sched.EndTimeHourMin - SuggestionsController.GetSchedDataByActor → Andromeda.Core.Services.TimeRange.Overlaps

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Sched_EndTimeHourMin["Andromeda.Core.Entities.Sched.EndTimeHourMin"]
    Andromeda_Core_Entities_Sched_StartTimeHour["Andromeda.Core.Entities.Sched.StartTimeHour"]
    Andromeda_Core_Entities_Sched_StartTimeHourMin["Andromeda.Core.Entities.Sched.StartTimeHourMin"]
    Andromeda_Core_Services_TimeRange_Overlaps["Andromeda.Core.Services.TimeRange.Overlaps"]
    SuggestionsController_GetSchedDataByActor["SuggestionsController.GetSchedDataByActor"]
    SuggestionsController_GetSchedDataByActor --> Andromeda_Core_Entities_Sched_EndTimeHourMin
    SuggestionsController_GetSchedDataByActor --> Andromeda_Core_Entities_Sched_StartTimeHour
    SuggestionsController_GetSchedDataByActor --> Andromeda_Core_Entities_Sched_StartTimeHourMin
    SuggestionsController_GetSchedDataByActor --> Andromeda_Core_Services_TimeRange_Overlaps
Detailed Analysis

Key Flows - check member availability - and return JSON schedule data. - Check member availability by filtering overlapping time slots - Return filtered

Error Flows - Summary: Prevent null reference exceptions from nullable ProjID or actorID usage. - Null reference exception from nullable ProjID, Null reference exception from nullable actorID

Security Issues - Summary: No security issues identified in GetSchedDataByActor method.

Performance Issues - Summary: Loading entire datasets and multiple data enumerations degrade performance. - Use of ToList() loads entire datasets into memory

Maintainability Issues - Summary: Hardcoded paths, ConfigurationManager usage, anonymous types, and unclear code reduce maintainability. - Use of ConfigurationManager.AppSettings decreases flexibility and testability

UX Impact Notes - Summary: Returning large JSON results degrades user experience. - Large JSON result impacts performance, Negative user experience from large data loads

Test Case Ideas - Summary: Verify correct schedule retrieval, error handling, grouping, filtering, counting, and sorting behaviors. - Checking member availability and filtering overlapping time slots - Returning correct count and list of free slots per activity - Returning empty list for empty input data

Dependencies & Called Services - Summary: Uses data conversion and enumeration to retrieve schedule data by actor within a time range. - Data conversion, Enumerable processing, Actor model usage, Integer identifiers, Schedule data handling, Time range filtering

RefreshCustomSched

Summary: RefreshCustomSched copies sched.csv to Customsched.csv and returns success status in JSON.

JsonResult SuggestionsController.RefreshCustomSched(int? ProjID)

Routing

  • HTTP: GET
  • URL: /Suggestions/RefreshCustomSched
Detailed Analysis

Key Flows - Summary: RefreshCustomSched copies sched.csv to Customsched.csv and returns success status in JSON. - Set success flag on copy success - Return JSON with isSuccess and msg

Error Flows - Summary: Handles specific file-related exceptions and returns error messages in JSON. - Catch DirectoryNotFoundException and set schedule file missing error - Catch FileNotFoundException and set schedule file missing error - Catch IOException and set file in use error - Catch all other exceptions and return exception message in JSON

Security Issues - Summary: Prevent path traversal by sanitizing ProjID before file path use. - Path traversal vulnerability from unsanitized ProjID, Lack of input validation on ProjID before file path construction

Performance Issues - Summary: Frequent large file copies with overwrite degrade performance. - Frequent large file copies, Overwrite-enabled file copying

Maintainability Issues - Summary: Undefined variables, corrupted code, and hardcoded paths reduce maintainability. - Undefined or misspelled variable 'fal' causing errors, Incomplete or corrupted code fragments reducing readability, Hardcoded file names and paths reducing flexibility

UX Impact Notes - Summary: Hardcoded and unclear error messages degrade user experience. - Hardcoded error messages, Insufficient error detail and localization, Incomplete or corrupted code causing unexpected behavior

Test Case Ideas - Summary: Verify successful file copy, error-free execution, and performance under load. - Handles large files and frequent copy operations efficiently - Valid ProjID file copy and JSON isSuccess true, Method compiles and runs without runtime errors

Dependencies & Called Services - Summary: RefreshCustomSched depends on file handling and integer operations. - File handling, Integer operations

GetTeamMemberRecords

Summary: Retrieve and filter team activities by actor ID to assess member availability and return a JSON summary.

JsonResult SuggestionsController.GetTeamMemberRecords(int? ProjID, int? actorID, string actId, int? member, int? hour)

Routing

  • HTTP: GET
  • URL: /Suggestions/GetTeamMemberRecords

Cross-layer call chain - SuggestionsController.GetTeamMemberRecords → Andromeda.Core.Entities.Sched.StartTimeHourMin - SuggestionsController.GetTeamMemberRecords → Andromeda.Core.Entities.Sched.EndTimeHourMin - SuggestionsController.GetTeamMemberRecords → Andromeda.Core.Services.TimeRange.Overlaps - SuggestionsController.GetTeamMemberRecords → Andromeda.Core.Entities.Sched.StartTimeHour

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Sched_EndTimeHourMin["Andromeda.Core.Entities.Sched.EndTimeHourMin"]
    Andromeda_Core_Entities_Sched_StartTimeHour["Andromeda.Core.Entities.Sched.StartTimeHour"]
    Andromeda_Core_Entities_Sched_StartTimeHourMin["Andromeda.Core.Entities.Sched.StartTimeHourMin"]
    Andromeda_Core_Services_TimeRange_Overlaps["Andromeda.Core.Services.TimeRange.Overlaps"]
    SuggestionsController_GetTeamMemberRecords["SuggestionsController.GetTeamMemberRecords"]
    SuggestionsController_GetTeamMemberRecords --> Andromeda_Core_Entities_Sched_EndTimeHourMin
    SuggestionsController_GetTeamMemberRecords --> Andromeda_Core_Entities_Sched_StartTimeHour
    SuggestionsController_GetTeamMemberRecords --> Andromeda_Core_Entities_Sched_StartTimeHourMin
    SuggestionsController_GetTeamMemberRecords --> Andromeda_Core_Services_TimeRange_Overlaps
Detailed Analysis

Key Flows - Summary: Retrieve and filter team activities by actor ID to assess member availability and return a JSON summary. - Return JSON with current member slots

Security Issues - Summary: Prevent SQL injection by validating and sanitizing all input parameters. - SQL injection risk from unvalidated input parameters

Performance Issues - Summary: Optimize LINQ queries and avoid boxing to improve performance with large datasets. - Multiple LINQ queries and repeated ToList() calls degrade performance on large datasets

Maintainability Issues - Summary: Replace magic strings and anonymous types to improve code clarity and maintainability. - Use of magic strings for file paths and filenames, Use of anonymous types in LINQ queries, Unclear variable names reducing code clarity

UX Impact Notes - Summary: Optimize method performance and JSON response structure to ensure responsive user experience. - Method performance affects application responsiveness, JSON response structure impacts displayed user data

Test Case Ideas - Summary: Verify data retrieval, filtering, performance, and correct handling of time slot scenarios. - Evaluate performance with large datasets - Handle empty time slot lists correctly - Validate data retrieval with varied valid inputs

Dependencies & Called Services - Summary: Uses data conversion and scheduling utilities for time range processing. - Data conversion utilities, Enumerable collections, Integer operations, Scheduling services, Time range handling

UpdateTeamMemberRecords

Summary: UpdateTeamMemberRecords reads CSV data, updates matching rows with member info, and rewrites the file if changes occur.

JsonResult SuggestionsController.UpdateTeamMemberRecords()

Routing

  • HTTP: POST
  • URL: /Suggestions/UpdateTeamMemberRecords

Cross-layer call chain - SuggestionsController.UpdateTeamMemberRecords → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    SuggestionsController_UpdateTeamMemberRecords["SuggestionsController.UpdateTeamMemberRecords"]
    SuggestionsController_UpdateTeamMemberRecords --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - Summary: UpdateTeamMemberRecords reads CSV data - updates matching rows with member info - Delete existing CSV file before writing updates - Iterate over units with a limit check - Set 'recUpdated' flag on updates - Return JSON response if no records updated - Update 6th column with member value if matched

Error Flows - Summary: Handle no updates and exceptions with appropriate JSON error responses. - Log errors and return JSON response on exceptions - Return JSON response if no records updated

Security Issues - Summary: User input in file paths risks unauthorized file access and deletion. - Path traversal vulnerability from user-input 'ProjID' in CSV file path, Unauthorized file deletion due to improper file path validation

Performance Issues - Summary: Loading entire CSV and repeated searches degrade performance; file operations are slow. - Loading entire CSV into memory causes high memory usage - File existence checks and deletions slow down performance

Maintainability Issues - Summary: The method suffers from unclear naming, magic strings, syntax errors, and incomplete code reducing maintainability. - Lack of context hinders understanding of logic

UX Impact Notes - Summary: The method informs users of update results and errors - JSON response for no updated records informs user

Test Case Ideas - Summary: Verify correct updates - handle absence gracefully - Handle incomplete or malformed CSV data without failure - Set recUpdated true only on actual updates - Return correct JSON response when no updates occur - Update matching CSV rows based on unit properties

Dependencies & Called Services - and logging. - Data conversion utilities, Enumeration utilities, File handling utilities, String manipulation utilities - Logging management

Controls

Summary: No key flows are defined in the Controls method.

ActionResult SuggestionsController.Controls()

Routing

  • URL: /Suggestions/Controls

Cross-layer call chain - SuggestionsController.Controls → Andromeda.Core.Services.ProcessExtensions.FindByID - SuggestionsController.Controls → Andromeda.Core.Services.Algorithms.Delooper.deloop - SuggestionsController.Controls → Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.Services.ProcessExtensions.FindByID

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows["Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop["Andromeda.Core.Services.Algorithms.Delooper.deloop"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    SuggestionsController_Controls["SuggestionsController.Controls"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    SuggestionsController_Controls --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    SuggestionsController_Controls --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    SuggestionsController_Controls --> Andromeda_Core_Services_ProcessExtensions_FindByID
View Metadata
  • View: Controls (Andromeda.Web\Views\Suggestions\Controls.cshtml)
Detailed Analysis

Key Flows - Summary: No key flows are defined in the Controls method.

UX Impact Notes - Summary: Returns a view that presents the controls interface - Return view presenting controls interface

Test Case Ideas - Summary: Verify method returns correct view and handles various HTTP requests. - Handle different HTTP request types - Return expected view

HR

Summary: No key flows are defined in the HR method section.

ActionResult SuggestionsController.HR()

Routing

  • URL: /Suggestions/HR
View Metadata
  • View: HR (Andromeda.Web\Views\Suggestions\HR.cshtml)
Detailed Analysis

Key Flows - Summary: No key flows are defined in the HR method section.

Maintainability Issues - Summary: The method name HR lacks clarity and does not convey its purpose. - Generic method name, Unclear method purpose

UX Impact Notes - Summary: The method returns a static view that directly affects user experience based on its design. - Return ActionResult rendering a view

Test Case Ideas - Summary: Verify method returns correct ActionResult and view for various HTTP requests. - Handle different HTTP request types - Return valid ActionResult - Return correct view - Return view without parameters

Infra

Summary: The method executes and returns a View directly to the caller.

ActionResult SuggestionsController.Infra()

Routing

  • URL: /Suggestions/Infra
View Metadata
  • View: Infra (Andromeda.Web\Views\Suggestions\Infra.cshtml)
Detailed Analysis

Key Flows - Summary: The method executes and returns a View directly to the caller. - Return View to caller

Maintainability Issues - Summary: The method has an empty body indicating incomplete implementation. - Empty method body, Incomplete implementation

UX Impact Notes - Summary: The returned View directly affects user experience based on its content and presentation. - Returned View content - Returned View presentation

Test Case Ideas - Summary: Verify method returns valid ActionResult with correct View and expected content. - Return valid ActionResult - Return View successfully