Skip to content

ProjectsController

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

Overview

The ProjectsController manages project lifecycle operations including creation, update, governance, merging, analysis, and reporting. It serves project managers, team members, and administrators to facilitate project planning, review, and collaboration.

Feature Summary

  • Manages project display, dashboard, and administration views.
  • Handles project creation, updates, governance approvals, and status changes.
  • Supports project merging, cloning, and child project management.
  • Provides custom reporting, visualization, and cluster analysis features.
  • Facilitates simulation runs, schedule analysis, and diagnostic summaries.
  • Manages user permissions, comments, notifications, and team member data.
  • Supports export features including Excel and Visio generation.
  • Implements review workflows with approval and rejection processes.

UX Summary

  • Multiple views provide detailed project metrics, governance, and analytics.
  • JSON responses guide user flow, error handling, and UI updates.
  • Redirects and early exits affect navigation and may expose sensitive data if not handled securely.
  • Email notifications and approval feedback influence user actions and workflow progression.
  • Some methods risk poor UX due to silent failures, unclear error messages, or performance delays.
  • Popups and grouped data enhance team collaboration experience.

Data Dependencies

  • Relies on project entities, governance records, sync histories, and activity data.
  • Uses XML data for project cloning and merging operations.
  • Interacts with license tokens and user roles for feature gating.
  • Processes JSON and CSV data for reporting and export functionalities.
  • Accesses email services for notifications and approval communications.
  • Utilizes session and request context for state management.

Authentication / Authorization Notes

  • Enforces project-level permission checks to control access and actions.
  • Risks unauthorized access due to insufficient input validation and weak permission enforcement in some methods.
  • Role and namespace validations are applied for custom report deletion and permission updates.
  • Sanitization of inputs is critical to prevent SQL injection, XSS, and data tampering.
  • Session management and license token handling require secure practices to avoid exposure.

Controller Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_AddParameter["Andromeda.Core.DataManager.AddParameter"]
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_DataManager_ExecuteScalar["Andromeda.Core.DataManager.ExecuteScalar"]
    Andromeda_Core_DataManager_GetData["Andromeda.Core.DataManager.GetData"]
    Andromeda_Core_DataManager_GetDataList["Andromeda.Core.DataManager.GetDataList"]
    Andromeda_Core_DataManager_SP_ExecNonQuery["Andromeda.Core.DataManager.SP_ExecNonQuery"]
    Andromeda_Core_Database_DataExtensions_GetDateTimeEx["Andromeda.Core.Database.DataExtensions.GetDateTimeEx"]
    Andromeda_Core_Database_DataExtensions_GetInt32Ex["Andromeda.Core.Database.DataExtensions.GetInt32Ex"]
    Andromeda_Core_Database_DataExtensions_GetStringEx["Andromeda.Core.Database.DataExtensions.GetStringEx"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_Entities_Activity_GetNVAType["Andromeda.Core.Entities.Activity.GetNVAType"]
    Andromeda_Core_Entities_Activity_ReworkEffort["Andromeda.Core.Entities.Activity.ReworkEffort"]
    Andromeda_Core_Entities_Activity_TotalEffort["Andromeda.Core.Entities.Activity.TotalEffort"]
    Andromeda_Core_Entities_Actor_GetLocation["Andromeda.Core.Entities.Actor.GetLocation"]
    Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkEndTimeInProjectZone"]
    Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone"]
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Entities_EdgeInfo_Clone["Andromeda.Core.Entities.EdgeInfo.Clone"]
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData["Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData"]
    Andromeda_Core_Entities_ProjectDataEntity_CompetencyCompensation["Andromeda.Core.Entities.ProjectDataEntity.CompetencyCompensation"]
    Andromeda_Core_Entities_ProjectData_GetCompensatoryActivities["Andromeda.Core.Entities.ProjectData.GetCompensatoryActivities"]
    Andromeda_Core_Entities_ProjectData_GetConnectivityDetails["Andromeda.Core.Entities.ProjectData.GetConnectivityDetails"]
    Andromeda_Core_Entities_ProjectData_GetInfraDetails["Andromeda.Core.Entities.ProjectData.GetInfraDetails"]
    Andromeda_Core_Entities_ProjectData_GetInfraMasterDetails["Andromeda.Core.Entities.ProjectData.GetInfraMasterDetails"]
    Andromeda_Core_Entities_ProjectData_GetObjectiveControlsMaster["Andromeda.Core.Entities.ProjectData.GetObjectiveControlsMaster"]
    Andromeda_Core_Entities_ProjectData_GetOfficeList["Andromeda.Core.Entities.ProjectData.GetOfficeList"]
    Andromeda_Core_Entities_ProjectData_GetOfficePremises["Andromeda.Core.Entities.ProjectData.GetOfficePremises"]
    Andromeda_Core_Entities_ProjectData_GetobjActivityRiskControls["Andromeda.Core.Entities.ProjectData.GetobjActivityRiskControls"]
    Andromeda_Core_Entities_ProjectGovernance_getModelCreationUsers["Andromeda.Core.Entities.ProjectGovernance.getModelCreationUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getModelSignOffUsers["Andromeda.Core.Entities.ProjectGovernance.getModelSignOffUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignApprovalUsers["Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignApprovalUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignUsers["Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignUsers"]
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter["Andromeda.Core.Extensions.LinqExtensions.CurrencyConverter"]
    Andromeda_Core_Extensions_LinqExtensions_DaysConverter["Andromeda.Core.Extensions.LinqExtensions.DaysConverter"]
    Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars["Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars"]
    Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars["Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars"]
    Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace["Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialCharwithSpace"]
    Andromeda_Core_Extensions_LinqExtensions_UserDisplayName["Andromeda.Core.Extensions.LinqExtensions.UserDisplayName"]
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    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_ExcelGenerator_CloneRow["Andromeda.Core.Services.ExcelGenerator.CloneRow"]
    Andromeda_Core_Services_ExcelGenerator_UpdateCell["Andromeda.Core.Services.ExcelGenerator.UpdateCell"]
    Andromeda_Core_Services_ExcelGenerator_getColumnName["Andromeda.Core.Services.ExcelGenerator.getColumnName"]
    Andromeda_Core_Services_KClusters_MinCluster["Andromeda.Core.Services.KClusters.MinCluster"]
    Andromeda_Core_Services_KClusters_RunClustering["Andromeda.Core.Services.KClusters.RunClustering"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    Andromeda_Core_Services_Registry_CheckPermissions["Andromeda.Core.Services.Registry.CheckPermissions"]
    Andromeda_Core_Services_Registry_UpdatePermissions["Andromeda.Core.Services.Registry.UpdatePermissions"]
    Andromeda_Core_Services_Registry_UserForceLogOffByProject["Andromeda.Core.Services.Registry.UserForceLogOffByProject"]
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Services_SignalRMsg_SendMessage["Andromeda.Core.Services.SignalRMsg.SendMessage"]
    Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX["Andromeda.Core.Services.VSDX.VSDXGenerate.ExportVSDX"]
    Andromeda_Core_Utility_Compress_CreateZip["Andromeda.Core.Utility.Compress.CreateZip"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    Andromeda_Core_Utility_Encrypt_EncryptData["Andromeda.Core.Utility.Encrypt.EncryptData"]
    Insorce_Helpers_ClusterHelper_GenerateCluster["Insorce.Helpers.ClusterHelper.GenerateCluster"]
    Insorce_Helpers_Helpers_CurrencyConverter["Insorce.Helpers.Helpers.CurrencyConverter"]
    Insorce_Helpers_Helpers_DaysConverter["Insorce.Helpers.Helpers.DaysConverter"]
    Insorce_Helpers_Helpers_GetImpPath["Insorce.Helpers.Helpers.GetImpPath"]
    Insorce_Helpers_Helpers_GetIndividualPath["Insorce.Helpers.Helpers.GetIndividualPath"]
    Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse["Insorce.Helpers.InsorceOpenAICalls.GenerateClusterResponse"]
    Insorce_Models_UserProfile_GetUserProfile["Insorce.Models.UserProfile.GetUserProfile"]
    Insorce_Models_UsersModel_FromMembershipUser["Insorce.Models.UsersModel.FromMembershipUser"]
    ProjectsController_ApproveProjectGovernance["ProjectsController.ApproveProjectGovernance"]
    ProjectsController_ApproveReview["ProjectsController.ApproveReview"]
    ProjectsController_ClusterAnalysis["ProjectsController.ClusterAnalysis"]
    ProjectsController_CreateChildProject["ProjectsController.CreateChildProject"]
    ProjectsController_CustomVisualization["ProjectsController.CustomVisualization"]
    ProjectsController_DecisionTree["ProjectsController.DecisionTree"]
    ProjectsController_DeleteCommentorNotification["ProjectsController.DeleteCommentorNotification"]
    ProjectsController_DeleteCustomReport["ProjectsController.DeleteCustomReport"]
    ProjectsController_DeleteProjectPermission["ProjectsController.DeleteProjectPermission"]
    ProjectsController_DeleteProjectTemp["ProjectsController.DeleteProjectTemp"]
    ProjectsController_DisplayProjects["ProjectsController.DisplayProjects"]
    ProjectsController_ExtractData["ProjectsController.ExtractData"]
    ProjectsController_GenarateMavenExcel["ProjectsController.GenarateMavenExcel"]
    ProjectsController_GetAgentData["ProjectsController.GetAgentData"]
    ProjectsController_GetBrSkill["ProjectsController.GetBrSkill"]
    ProjectsController_GetMappingDetails["ProjectsController.GetMappingDetails"]
    ProjectsController_GetProjectChanges["ProjectsController.GetProjectChanges"]
    ProjectsController_MergeMultipleproject["ProjectsController.MergeMultipleproject"]
    ProjectsController_MergeProject["ProjectsController.MergeProject"]
    ProjectsController_ProjectAdmin["ProjectsController.ProjectAdmin"]
    ProjectsController_ProjectDashboard["ProjectsController.ProjectDashboard"]
    ProjectsController_ProjectHub["ProjectsController.ProjectHub"]
    ProjectsController_RejectReview["ProjectsController.RejectReview"]
    ProjectsController_RenewelToken["ProjectsController.RenewelToken"]
    ProjectsController_SaveBenchmarkForProject["ProjectsController.SaveBenchmarkForProject"]
    ProjectsController_SaveCommentText["ProjectsController.SaveCommentText"]
    ProjectsController_SaveCustomReport["ProjectsController.SaveCustomReport"]
    ProjectsController_SaveProjectUserPermission["ProjectsController.SaveProjectUserPermission"]
    ProjectsController_SaveRequest["ProjectsController.SaveRequest"]
    ProjectsController_SaveTemplateForProject["ProjectsController.SaveTemplateForProject"]
    ProjectsController_SendforReview["ProjectsController.SendforReview"]
    ProjectsController_UpdateCustomReport["ProjectsController.UpdateCustomReport"]
    ProjectsController_UpdateIsSeenColumn["ProjectsController.UpdateIsSeenColumn"]
    ProjectsController_UpdateProject["ProjectsController.UpdateProject"]
    ProjectsController_UpdateProjectDetailes["ProjectsController.UpdateProjectDetailes"]
    ProjectsController_UpdateProjectGovernance["ProjectsController.UpdateProjectGovernance"]
    ProjectsController_UpdateProjectStatus["ProjectsController.UpdateProjectStatus"]
    ProjectsController_Welcome["ProjectsController.Welcome"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    Andromeda_Core_Entities_Actor_GetLocation --> Andromeda_Core_DataManager_GetData
    Andromeda_Core_Entities_ProjectDataEntity_CompetencyCompensation --> Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter
    Andromeda_Core_Entities_ProjectData_GetCompensatoryActivities --> Andromeda_Core_DataManager_GetDataList
    Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter --> Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    Andromeda_Core_Services_Registry_CheckPermissions --> Andromeda_Core_LoggingManager_Info
    Andromeda_Core_Services_Registry_UserForceLogOffByProject --> Andromeda_Core_Services_SignalRMsg_SendMessage
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Info
    Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX --> Andromeda_Core_Utility_Compress_CreateZip
    Insorce_Helpers_ClusterHelper_GenerateCluster --> Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace
    Insorce_Helpers_ClusterHelper_GenerateCluster --> Andromeda_Core_Services_KClusters_RunClustering
    Insorce_Helpers_ClusterHelper_GenerateCluster --> Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse
    Insorce_Helpers_Helpers_CurrencyConverter --> Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter
    Insorce_Helpers_Helpers_DaysConverter --> Andromeda_Core_Extensions_LinqExtensions_DaysConverter
    Insorce_Helpers_Helpers_GetIndividualPath --> Andromeda_Core_Entities_Arrow_Clone
    Insorce_Helpers_Helpers_GetIndividualPath --> Andromeda_Core_Entities_EdgeInfo_Clone
    ProjectsController_ApproveProjectGovernance --> Andromeda_Core_DataManager_Execute
    ProjectsController_ApproveReview --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_ApproveReview --> Andromeda_Core_Entities_ProjectGovernance_getModelCreationUsers
    ProjectsController_ApproveReview --> Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignUsers
    ProjectsController_ClusterAnalysis --> Andromeda_Core_Services_KClusters_MinCluster
    ProjectsController_ClusterAnalysis --> Insorce_Helpers_ClusterHelper_GenerateCluster
    ProjectsController_CreateChildProject --> Andromeda_Core_LoggingManager_Error
    ProjectsController_CustomVisualization --> Andromeda_Core_Entities_Arrow_Clone
    ProjectsController_DecisionTree --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProjectsController_DecisionTree --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProjectsController_DecisionTree --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProjectsController_DeleteCommentorNotification --> Andromeda_Core_DataManager_Execute
    ProjectsController_DeleteCustomReport --> Andromeda_Core_DataManager_Execute
    ProjectsController_DeleteProjectPermission --> Andromeda_Core_Services_Registry_UserForceLogOffByProject
    ProjectsController_DeleteProjectPermission --> Andromeda_Core_Services_Registry_setProjectDetails
    ProjectsController_DeleteProjectPermission --> Andromeda_Core_Services_SignalRMsg_SendMessage
    ProjectsController_DeleteProjectTemp --> Andromeda_Core_Services_Registry_CheckPermissions
    ProjectsController_DeleteProjectTemp --> Andromeda_Core_Services_Registry_setProjectDetails
    ProjectsController_DisplayProjects --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProjectsController_ExtractData --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_Activity_GetNVAType
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_Actor_GetLocation
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetCompensatoryActivities
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetConnectivityDetails
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetInfraDetails
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetInfraMasterDetails
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetObjectiveControlsMaster
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetOfficeList
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetOfficePremises
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetobjActivityRiskControls
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Services_ExcelGenerator_CloneRow
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Services_ExcelGenerator_UpdateCell
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Services_ExcelGenerator_getColumnName
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Utility_Compress_CreateZip
    ProjectsController_GenarateMavenExcel --> Insorce_Helpers_Helpers_CurrencyConverter
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Activity_GetNVAType
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Activity_ReworkEffort
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Activity_TotalEffort
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Actor_GetLocation
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Arrow_Clone
    ProjectsController_GetAgentData --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
    ProjectsController_GetAgentData --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProjectsController_GetAgentData --> Andromeda_Core_Services_ExcelGenerator_CloneRow
    ProjectsController_GetAgentData --> Andromeda_Core_Services_ExcelGenerator_UpdateCell
    ProjectsController_GetAgentData --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProjectsController_GetAgentData --> Insorce_Helpers_Helpers_GetIndividualPath
    ProjectsController_GetBrSkill --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProjectsController_GetMappingDetails --> Andromeda_Core_DataManager_GetDataList
    ProjectsController_GetProjectChanges --> Andromeda_Core_DataManager_GetData
    ProjectsController_GetProjectChanges --> Andromeda_Core_Database_DataExtensions_GetDateTimeEx
    ProjectsController_GetProjectChanges --> Andromeda_Core_Database_DataExtensions_GetInt32Ex
    ProjectsController_GetProjectChanges --> Andromeda_Core_Database_DataExtensions_GetStringEx
    ProjectsController_MergeMultipleproject --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProjectsController_MergeMultipleproject --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProjectsController_MergeProject --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProjectsController_ProjectAdmin --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_ProjectAdmin --> Andromeda_Core_Entities_Project_GetTags
    ProjectsController_ProjectAdmin --> Andromeda_Core_Extensions_LinqExtensions_UserDisplayName
    ProjectsController_ProjectAdmin --> Insorce_Models_UserProfile_GetUserProfile
    ProjectsController_ProjectDashboard --> Andromeda_Core_Entities_ProjectDataEntity_CompetencyCompensation
    ProjectsController_ProjectDashboard --> Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter
    ProjectsController_ProjectDashboard --> Insorce_Helpers_Helpers_DaysConverter
    ProjectsController_ProjectDashboard --> Insorce_Helpers_Helpers_GetImpPath
    ProjectsController_ProjectHub --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_ProjectHub --> Insorce_Models_UserProfile_GetUserProfile
    ProjectsController_RejectReview --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_RejectReview --> Andromeda_Core_Entities_ProjectGovernance_getModelCreationUsers
    ProjectsController_RejectReview --> Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignApprovalUsers
    ProjectsController_RejectReview --> Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignUsers
    ProjectsController_RenewelToken --> Andromeda_Core_Services_Registry_setProjectDetails
    ProjectsController_RenewelToken --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProjectsController_SaveBenchmarkForProject --> Andromeda_Core_DataManager_Execute
    ProjectsController_SaveCommentText --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_SaveCommentText --> Insorce_Models_UserProfile_GetUserProfile
    ProjectsController_SaveCommentText --> Insorce_Models_UsersModel_FromMembershipUser
    ProjectsController_SaveCustomReport --> Andromeda_Core_DataManager_ExecuteScalar
    ProjectsController_SaveProjectUserPermission --> Andromeda_Core_Services_Registry_setProjectDetails
    ProjectsController_SaveProjectUserPermission --> Andromeda_Core_Services_SignalRMsg_SendMessage
    ProjectsController_SaveRequest --> Andromeda_Core_DataManager_AddParameter
    ProjectsController_SaveRequest --> Andromeda_Core_DataManager_SP_ExecNonQuery
    ProjectsController_SaveTemplateForProject --> Andromeda_Core_DataManager_Execute
    ProjectsController_SendforReview --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_SendforReview --> Andromeda_Core_Entities_ProjectGovernance_getModelSignOffUsers
    ProjectsController_SendforReview --> Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignApprovalUsers
    ProjectsController_UpdateCustomReport --> Andromeda_Core_DataManager_Execute
    ProjectsController_UpdateIsSeenColumn --> Andromeda_Core_DataManager_Execute
    ProjectsController_UpdateProject --> Andromeda_Core_Services_Registry_UpdatePermissions
    ProjectsController_UpdateProject --> Andromeda_Core_Services_Registry_setProjectDetails
    ProjectsController_UpdateProjectDetailes --> Andromeda_Core_Services_Registry_UpdatePermissions
    ProjectsController_UpdateProjectDetailes --> Andromeda_Core_Services_Registry_setProjectDetails
    ProjectsController_UpdateProjectGovernance --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_UpdateProjectGovernance --> Andromeda_Core_Entities_ProjectGovernance_getModelCreationUsers
    ProjectsController_UpdateProjectGovernance --> Andromeda_Core_Entities_ProjectGovernance_getModelSignOffUsers
    ProjectsController_UpdateProjectGovernance --> Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignApprovalUsers
    ProjectsController_UpdateProjectGovernance --> Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignUsers
    ProjectsController_UpdateProjectStatus --> Andromeda_Core_Services_Registry_setProjectDetails
    ProjectsController_Welcome --> Andromeda_Core_LoggingManager_Exception
    ProjectsController_Welcome --> Andromeda_Core_Utility_Encrypt_EncryptData
    ProjectsController_Welcome --> Insorce_Models_UserProfile_GetUserProfile

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
admin Admin - Andromeda.Web\Views\Projects\Admin.cshtml
clusteranalysis ClusterAnalysis - Andromeda.Web\Views\Projects\ClusterAnalysis.cshtml
commentsandnotifications CommentsandNotifications IList<CommentsText> Andromeda.Web\Views\Projects\CommentsandNotifications.cshtml
customreport CustomReport Andromeda.Core.Entities.ProjectData Andromeda.Web\Views\Projects\CustomReport.cshtml
customvisualization CustomVisualization - Andromeda.Web\Views\Projects\CustomVisualization.cshtml
dataextract DataExtract - Andromeda.Web\Views\Projects\DataExtract.cshtml
decisiontree DecisionTree - Andromeda.Web\Views\Projects\DecisionTree.cshtml
diagnosticsummary DiagnosticSummary ProjectDataEntity Andromeda.Web\Views\Projects\DiagnosticSummary.cshtml
displayprojects DisplayProjects IList<Andromeda.Core.Entities.Project> Andromeda.Web\Views\Projects\DisplayProjects.cshtml
getprojectchanges GetProjectChanges ProjectChanges Andromeda.Web\Views\Projects\GetProjectChanges.cshtml
implementingdecision ImplementingDecision IList<Andromeda.Core.Entities.OptimizeHistory> Andromeda.Web\Views\Projects\ImplementingDecision.cshtml
mergeprojects MergeProjects - Andromeda.Web\Views\Projects\MergeProjects.cshtml
projectadmin ProjectAdmin IEnumerable<Andromeda.Core.Entities.SyncHistory> Andromeda.Web\Views\Projects\ProjectAdmin.cshtml
projectdashboard ProjectDashboard Andromeda.Core.Entities.Project*@ Andromeda.Web\Views\Projects\ProjectDashboard.cshtml
projecthub ProjectHub Andromeda.Core.Entities.Project Andromeda.Web\Views\Projects\ProjectHub.cshtml
redirectview RedirectView - Andromeda.Web\Views\Projects\RedirectView.cshtml
repairproject RepairProject IList<Andromeda.Validation.VisioError> Andromeda.Web\Views\Projects\RepairProject.cshtml
scheduleanalysis ScheduleAnalysis IList<ScheduleAnalysis> Andromeda.Web\Views\Projects\ScheduleAnalysis.cshtml
welcome Welcome IList<Andromeda.Core.Entities.Project> Andromeda.Web\Views\Projects\Welcome.cshtml

Methods at a Glance

Command / Save Operations

Type Method HTTP URL Summary
entrypoint DisplayProjects GET /Projects/DisplayProjects Initialize and filter projects, retrieve review statuses, configure features...
entrypoint ChangeBaseProject POST /Projects/ChangeBaseProject ChangeBaseProject updates the root and project ID based on the MakeAsRoot flag...
entrypoint GetConflicts `` /Projects/GetConflicts GetConflicts handles conflict detection by retrieving child IDs based on SyncID...
entrypoint SaveRequest POST /Projects/SaveRequest SaveRequest saves requests with non-empty MakerComment and returns a redirect...
entrypoint SaveProjectUserPermission POST /Projects/SaveProjectUserPermission SaveProjectUserPermission updates or creates user permissions for a project.
entrypoint DeleteSimulation POST /Projects/DeleteSimulation DeleteSimulation handles POST requests to delete a simulation record by ID and...
entrypoint ProjectHub `` /Projects/ProjectHub Fetch current project details and update module status accordingly.
entrypoint ApproveReview POST /Projects/ApproveReview ApproveReview updates project status, manages governance approvals, sends...
entrypoint SaveDefaultCluster POST /Projects/SaveDefaultCluster Convert form value to integer selId, save configuration, perform cluster...
entrypoint ClearSession POST /Projects/ClearSession ClearSession removes the 'ExpiryDays' session variable via HTTP POST and...
entrypoint UpdateProjectDetailes POST /Projects/UpdateProjectDetailes Update project freeze status and details based on request, then return update...
entrypoint SaveCommentText POST /Projects/SaveCommentText Extract comment data from POST request and persist it using...
entrypoint UpdateIsSeenColumn POST /Projects/UpdateIsSeenColumn UpdateIsSeenColumn updates the 'IsSeen' status for each project item by ID and...
entrypoint SaveTemplateForProject `` /Projects/SaveTemplateForProject The method verifies the template flag, saves the template data for the project...
entrypoint SaveBenchmarkForProject `` /Projects/SaveBenchmarkForProject Decode 'IsBenchmark' JSON from request and save benchmark data for the project...
entrypoint EditPropMap GET /Projects/EditPropMap EditPropMap manages property mappings by editing and updating key-value pairs.
entrypoint UpdateProjectStatus POST /Projects/UpdateProjectStatus UpdateProjectStatus retrieves the current project ID, sets its status to...
entrypoint DeleteProjectPermission POST /Projects/DeleteProjectPermission DeleteProjectPermission updates project details in the registry when necessary.

Export & Reporting

Type Method HTTP URL Summary
entrypoint CustomReport GET /Projects/CustomReport Load project data and custom reports, then redirect based on activity count.
entrypoint SaveCustomReport POST /Projects/SaveCustomReport SaveCustomReport handles creating or updating a custom report with validation...
entrypoint UpdateCustomReport POST /Projects/UpdateCustomReport Retrieve report details from the request and locate the custom report by ID for...
entrypoint DeleteCustomReport POST /Projects/DeleteCustomReport Retrieve and verify the custom report by ID, enforce role and namespace checks...

File & Import Operations

Type Method HTTP URL Summary
entrypoint DeleteTeam `` /Projects/DeleteTeam DeleteTeam removes the actor if no activities exist, handling missing files...
entrypoint MergeProject POST /Projects/MergeProject MergeProject extracts data, validates status, updates and combines project...
entrypoint GenarateMavenExcel GET /Projects/GenarateMavenExcel GenerateMavenExcel retrieves project data, populates an Excel template, and...
entrypoint ExtractData GET /Projects/ExtractData Extract project activities and controls, filter related data, and return as...
entrypoint GetAgentData GET /Projects/GetAgentData GetAgentData retrieves and processes legacy, automation, risk, and schedule...

Query & View Methods

Type Method HTTP URL Summary
entrypoint GetProjStatus `` /Projects/GetProjStatus GetProjStatus evaluates Data collection types and conditions to return status...
entrypoint GetMappingDetails `` /Projects/GetMappingDetails Retrieve latest revisions of child and parent projects, filter mappings, and...
entrypoint DiscardGetLatest POST /Projects/DiscardGetLatest DiscardGetLatest discards child project changes and copies XML from parent if...
entrypoint RepairProject GET /Projects/RepairProject Retrieve project data and error counts, set view properties, and return the...
entrypoint SendforReview POST /Projects/SendforReview Retrieve project governance for approval, insert approval records with...
entrypoint GetBrSkill `` /Projects/GetBrSkill GetBrSkill retrieves a skill score from input and returns a corresponding...
entrypoint getActType `` /Projects/getActType Determine activity type by evaluating ActivityData properties and specific type...
entrypoint CustomizedTable GET /Projects/CustomizedTable Handles HTTP GET requests by setting the page context and returning a redirect...
entrypoint CustomizedAnalytics GET /Projects/CustomizedAnalytics Handles HTTP GET requests by setting page data and returning a redirect view.
entrypoint TechnologyAnalytics GET /Projects/TechnologyAnalytics TechnologyAnalytics handles an HTTP GET request and sets the page identifier in...
entrypoint ControlRedundancy GET /Projects/ControlRedundancy Handles HTTP GET requests by setting the page context and returning the...
entrypoint CustomerControlRedundancy GET /Projects/CustomerControlRedundancy Handles HTTP GET requests by setting the page identifier and returning the...
entrypoint UnderControlled GET /Projects/UnderControlled Handles HTTP GET requests by setting view data and returning a specific view.
entrypoint ScheduleAnalysis GET /Projects/ScheduleAnalysis Fetch schedule analysis and observations for the current project and return a...
entrypoint GetActivitesJSON GET /Projects/GetActivitesJSON GetActivitesJSON queries activities by optional project ID and returns them as...
entrypoint GetProjectChanges GET /Projects/GetProjectChanges GetProjectChanges retrieves project changes, activities, and actor locations...
entrypoint ContactCustomerSucTeam POST /Projects/ContactCustomerSucTeam Retrieve project data, generate OTP, email CST with details, store approval...
entrypoint DiagnosticSummary GET /Projects/DiagnosticSummary Retrieve project ID, fetch comparison data, populate view data, and return...

Validation & Rules

Type Method HTTP URL Summary
entrypoint ProjectDashboard GET /Projects/ProjectDashboard Fetch project data, check activity conditions, gather related projects and...
entrypoint UpdateProject POST /Projects/UpdateProject UpdateProject checks project existence, updates details if absent, and returns...
entrypoint CreateChildProject POST /Projects/CreateChildProject Extract form data, verify project existence, create child project, update...
entrypoint RejectReq POST /Projects/RejectReq RejectReq processes rejection via POST using SyncID, checks parent status, and...
entrypoint Welcome GET /Projects/Welcome Initialize context, determine project ID, check review statuses, set flags, and...
entrypoint MergeMultipleproject POST /Projects/MergeMultipleproject The method validates input, creates a target project, merges multiple source...
entrypoint SavePathClusterRank POST /Projects/SavePathClusterRank Retrieve valid integer selId from form, validate range, save configuration, and...
entrypoint CheckProjectLevelPermission GET /Projects/CheckProjectLevelPermission CheckProjectLevelPermission verifies if a user has the required permissions at...
entrypoint DeleteProjectTemp POST /Projects/DeleteProjectTemp DeleteProjectTemp retrieves and validates ProjectId, updates registry if...
entrypoint ModelValidation GET /Projects/ModelValidation ModelValidation handles HTTP GET requests with an optional parameter and sets...
entrypoint DecisionTree GET /Projects/DecisionTree Fetch project data, comments, and activities; check rework volume and iteration...

Workflow & Routing

Type Method HTTP URL Summary
entrypoint UpdateProjectGovernance POST /Projects/UpdateProjectGovernance UpdateProjectGovernance processes form data, manages governance record states...
entrypoint ApproveProjectGovernance POST /Projects/ApproveProjectGovernance Approve pending project governance by validating conditions, updating state...
entrypoint ProjectAdmin GET /Projects/ProjectAdmin Load and assign project governance, tags, groups, and child projects data to...
entrypoint ApproveReq POST /Projects/ApproveReq ApproveReq processes SyncID, detects conflicts, and sets view data for parent...
entrypoint RunSimulation POST /Projects/RunSimulation Retrieve and convert input parameters, update actors' OutProcessActor based on...
entrypoint CustomVisualization GET /Projects/CustomVisualization Retrieve project data, process and clone activity arrows, manage arrow...
entrypoint RejectReview POST /Projects/RejectReview RejectReview handles the process of rejecting a review, updating status, and...
entrypoint UpdateTargetObjectives POST /Projects/UpdateTargetObjectives Process POST request to create and store TargetObjectives, then return success...
entrypoint GetNodeName `` /Projects/GetNodeName GetNodeName returns a node name string based on the input id using a switch...
entrypoint GetHelpImages POST /Projects/GetHelpImages GetHelpImages processes a POST request with a HelpTopic, parses HelpGallery.xml...
entrypoint DataExtract GET /Projects/DataExtract Handles HTTP GET requests by fetching, processing, sorting project data...
entrypoint TeamAnalytics GET /Projects/TeamAnalytics Process HTTP GET request by setting view data and returning the redirect view.
entrypoint GetName `` /Projects/GetName GetName returns specific role name strings based on the ProjectRoles enum input...

Other Methods

Type Method HTTP URL Summary
entrypoint JsonDateParse GET /Projects/JsonDateParse The method finds JSON date strings using regex and replaces them with "1900" in...
entrypoint ImplementingDecision GET /Projects/ImplementingDecision Fetch project activities and redirect based on conditions; otherwise, display...
entrypoint DeleteAllSimulation POST /Projects/DeleteAllSimulation The method deletes all simulation records for the current project and returns a...
entrypoint ClusterAnalysis GET /Projects/ClusterAnalysis Fetch project data, group activities by actor, retrieve standardization...
entrypoint MergeProjects GET /Projects/MergeProjects MergeProjects consolidates multiple projects into one, resolving conflicts and...
entrypoint RenewelToken POST /Projects/RenewelToken RenewalToken conditionally calls method 't' if the current project's license...
entrypoint CommentsandNotifications GET /Projects/CommentsandNotifications No key flows are defined for CommentsandNotifications.
entrypoint DeleteCommentorNotification POST /Projects/DeleteCommentorNotification The method deletes a commentor notification by Id and returns the deletion...
entrypoint PopUpTeamMembers GET /Projects/PopUpTeamMembers Group team member data and return it as a JSON response.
helper Initialize GET /Projects/Initialize Initialize method calls the base class's Initialize with the given...

Associated Screens / Views

  • DisplayProjectsDisplayProjects (Andromeda.Web\Views\Projects\DisplayProjects.cshtml)
  • ProjectDashboardProjectDashboard (Andromeda.Web\Views\Projects\ProjectDashboard.cshtml)
  • ProjectAdminProjectAdmin (Andromeda.Web\Views\Projects\ProjectAdmin.cshtml)
  • RepairProjectRepairProject (Andromeda.Web\Views\Projects\RepairProject.cshtml)
  • ImplementingDecisionImplementingDecision (Andromeda.Web\Views\Projects\ImplementingDecision.cshtml)
  • WelcomeWelcome (Andromeda.Web\Views\Projects\Welcome.cshtml)
  • CustomReportCustomReport (Andromeda.Web\Views\Projects\CustomReport.cshtml)
  • CustomVisualizationCustomVisualization (Andromeda.Web\Views\Projects\CustomVisualization.cshtml)
  • ProjectHubProjectHub (Andromeda.Web\Views\Projects\ProjectHub.cshtml)
  • ClusterAnalysisClusterAnalysis (Andromeda.Web\Views\Projects\ClusterAnalysis.cshtml)
  • MergeProjectsMergeProjects (Andromeda.Web\Views\Projects\MergeProjects.cshtml)
  • DataExtractDataExtract (Andromeda.Web\Views\Projects\DataExtract.cshtml)
  • CommentsandNotificationsCommentsandNotifications (Andromeda.Web\Views\Projects\CommentsandNotifications.cshtml)
  • DecisionTreeDecisionTree (Andromeda.Web\Views\Projects\DecisionTree.cshtml)
  • ScheduleAnalysisScheduleAnalysis (Andromeda.Web\Views\Projects\ScheduleAnalysis.cshtml)
  • GetProjectChangesGetProjectChanges (Andromeda.Web\Views\Projects\GetProjectChanges.cshtml)
  • DiagnosticSummaryDiagnosticSummary (Andromeda.Web\Views\Projects\DiagnosticSummary.cshtml)

Entrypoint Methods

DisplayProjects

Summary: Initialize and filter projects, retrieve review statuses, configure features, populate stages, and update project properties for display.

ActionResult ProjectsController.DisplayProjects()

Routing

  • HTTP: GET
  • URL: /Projects/DisplayProjects

Cross-layer call chain - ProjectsController.DisplayProjects → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    ProjectsController_DisplayProjects["ProjectsController.DisplayProjects"]
    ProjectsController_DisplayProjects --> Andromeda_Core_Utility_Encrypt_DecryptString
View Metadata
  • View: DisplayProjects (Andromeda.Web\Views\Projects\DisplayProjects.cshtml)
  • Model: IList<Andromeda.Core.Entities.Project>
Detailed Analysis

Key Flows - and update project properties for display. - Check wizard project feature via configuration - Populate project stages and assign data counts to ViewData - Update project properties: IsProjectStarted

Error Flows - Summary: Handle exceptions explicitly and check for nulls to prevent runtime errors. - Empty catch blocks hide exceptions during project data retrieval - Use of First() and FirstOrDefault() without null checks risks exceptions

Security Issues - Summary: Handle license token exceptions and sanitize 'scrn' to prevent security risks. - Handle exceptions during license token decryption - Sanitize 'scrn' variable to prevent SQL injection and data tampering

Performance Issues - Summary: Optimize LINQ usage and database calls to prevent high memory use and slow execution. - Inefficient LINQ methods inside loops on large collections, Multiple sequential database calls for projects and maker roles, High memory use from GroupBy and ToList on large collections, Unoptimized iteration over large constant node collections, Risk of infinite loop causing unresponsiveness

Maintainability Issues - Summary: The code suffers from unclear naming, magic values, tight coupling, incomplete snippets, and poor error handling. - Empty catch blocks hindering error diagnosis

UX Impact Notes - updates statuses - Empty catch blocks prevent error feedback - Notification counts and project statuses update user - WizardProject setting influences project display and interaction

Test Case Ideas - status assignment - and return correctness. - Handle IsProjectLevelLicense true and false cases - Assign notifications count and module statuses to projects - Return correct ActionResult and control flow - Filter and process projects based on configuration settings like WizardProject - Process empty and large project collections for performance

Dependencies & Called Services - Summary: Uses data conversion, encryption, collections, and project processing interfaces. - DateTime conversion, Data encryption, Enumerable collections, IProcessModel interface, IProjectModel interface, List collection, Project data handling, String manipulation

GetProjStatus

Summary: GetProjStatus evaluates Data collection types and conditions to return status objects or navigation tuples.

Tuple<string, string> ProjectsController.GetProjStatus(List<ProjectApproval> Data)

Routing

  • URL: /Projects/GetProjStatus
Detailed Analysis

Key Flows - Summary: GetProjStatus evaluates Data collection types and conditions to return status objects or navigation tuples. - Check empty Data or elements with Module PermisionModule.FTR for submodule and approval conditions - Evaluate EffortNodes with submodule and status to return corresponding object or tuple - Return tuple with 'Control Validation' message and URL for ControlNodes meeting conditions

Error Flows - Summary: Handle conversion errors and null references to prevent runtime exceptions. - Lack of error handling for Convert.ToInt32 causing format exceptions or overflows, Potential null reference exceptions from 'Data' or 'Constants.ControlNodes' being null, Incomplete or incorrect code causing compilation or runtime errors

Security Issues - Summary: Sanitize 'Data' variable to prevent SQL injection and data tampering. - SQL injection risk from unsanitized 'Data', Data tampering risk from unsanitized 'Data'

Performance Issues - Summary: Nested Any() calls on large collections degrade performance. - Nested Any() calls on large constants collections

Maintainability Issues - Summary: Improve code clarity by defining constants and simplifying conditionals. - Use of undefined magic strings and characters, Complex nested conditional statements, Incomplete and syntactically incorrect code fragments

UX Impact Notes - Summary: Status messages and approval logic control user navigation and workflow progression. - Approval status logic controls workflow progression

Test Case Ideas - Summary: Test GetProjStatus for various data inputs and conditional branches to ensure correct status and navigation. - Handle empty Data collection - Test conditional logic with Constants.FTRNodes - Confirm method returns expected tuple with 'Control Validation' and '/Process/ProcessCreation'

Dependencies & Called Services - Summary: Uses Convert and Enumerable for data transformation and collection operations. - Convert for data type conversion, Enumerable for collection manipulation

ProjectDashboard

Summary: Fetch project data, check activity conditions, gather related projects and plans, then prepare dashboard data.

ActionResult ProjectsController.ProjectDashboard(int? ID, string Name)

Routing

  • HTTP: GET
  • URL: /Projects/ProjectDashboard

Cross-layer call chain - ProjectsController.ProjectDashboard → Insorce.Helpers.Helpers.GetImpPath - ProjectsController.ProjectDashboard → Andromeda.Core.Extensions.LinqExtensions.CurrencyConverter - ProjectsController.ProjectDashboard → Andromeda.Core.Entities.ProjectDataEntity.CompetencyCompensation - ProjectsController.ProjectDashboard → Insorce.Helpers.Helpers.DaysConverter - Andromeda.Core.Extensions.LinqExtensions.CurrencyConverter → Andromeda.Core.Extensions.LinqExtensions.CurrencyConverter - Andromeda.Core.Entities.ProjectDataEntity.CompetencyCompensation → Andromeda.Core.Extensions.LinqExtensions.CurrencyConverter - Insorce.Helpers.Helpers.DaysConverter → Andromeda.Core.Extensions.LinqExtensions.DaysConverter

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_ProjectDataEntity_CompetencyCompensation["Andromeda.Core.Entities.ProjectDataEntity.CompetencyCompensation"]
    Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter["Andromeda.Core.Extensions.LinqExtensions.CurrencyConverter"]
    Andromeda_Core_Extensions_LinqExtensions_DaysConverter["Andromeda.Core.Extensions.LinqExtensions.DaysConverter"]
    Insorce_Helpers_Helpers_DaysConverter["Insorce.Helpers.Helpers.DaysConverter"]
    Insorce_Helpers_Helpers_GetImpPath["Insorce.Helpers.Helpers.GetImpPath"]
    ProjectsController_ProjectDashboard["ProjectsController.ProjectDashboard"]
    Andromeda_Core_Entities_ProjectDataEntity_CompetencyCompensation --> Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter
    Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter --> Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter
    Insorce_Helpers_Helpers_DaysConverter --> Andromeda_Core_Extensions_LinqExtensions_DaysConverter
    ProjectsController_ProjectDashboard --> Andromeda_Core_Entities_ProjectDataEntity_CompetencyCompensation
    ProjectsController_ProjectDashboard --> Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter
    ProjectsController_ProjectDashboard --> Insorce_Helpers_Helpers_DaysConverter
    ProjectsController_ProjectDashboard --> Insorce_Helpers_Helpers_GetImpPath
View Metadata
  • View: ProjectDashboard (Andromeda.Web\Views\Projects\ProjectDashboard.cshtml)
  • Model: Andromeda.Core.Entities.Project*@
Detailed Analysis

Key Flows - check activity conditions - Check activity conditions and redirect if needed - Fetch implementation plans for project IDs - Retrieve and update project details and status - Store data in ViewData and return dashboard object

Error Flows - Summary: Handle nulls and empty collections to prevent exceptions and ensure correct redirects. - Check for null project and entity objects before data access - Early return on unmet activity conditions - Redirect to ProcessCreation on specific condition

Security Issues - Summary: Validate and sanitize JSON input to prevent deserialization vulnerabilities. - JSON deserialization vulnerability, Lack of input validation and sanitization

Performance Issues - Summary: Optimize LINQ usage and reduce redundant data extraction to improve performance. - Slow OrderBy and Select on large datasets

Maintainability Issues - Summary: Code suffers from unclear naming, magic numbers, redundant data extraction, and incomplete snippets. - Incomplete and truncated code snippets, Use of unexplained magic numbers, Typo-like variable names causing confusion, Undefined or unclear functions and variables, Redundant extraction of project ID lists, Anonymous objects in ViewData complicate maintenance

UX Impact Notes - Summary: ProjectDashboard alters user flow and displays detailed project metrics to inform progress. - Early return disrupts user workflow if unhandled - Returned object provides detailed project info shaping dashboard experience - Redirect to ProcessCreation changes navigation

Test Case Ideas - status updates - Early return on unmet activity criteria - Accurate project details retrieval and status updates - Returned object contains expected properties with correct currency and days conversions - Proper calculation and assignment of customer experience metrics - Correct assignment of variables 'ss' and 'plans' for view data setup - Fetching implementation plans for correct project IDs - Redirection based on function y() condition

Dependencies & Called Services - Summary: Uses data models, collections, LINQ, and helper utilities for project dashboard processing. - Data models: IActorModel, IProcessModel, IProjectModel, ProjectDataEntity, Collections and LINQ: Enumerable, List, LinqExtensions, Helpers and utilities: Convert, Helpers, Math, Primitive types: Int32, String

JsonDateParse

Summary: The method finds JSON date strings using regex and replaces them with "1900" in the input string.

string ProjectsController.JsonDateParse(string data)

Routing

  • HTTP: GET
  • URL: /Projects/JsonDateParse
Detailed Analysis

Key Flows - Summary: The method finds JSON date strings using regex and replaces them with "1900" in the input string. - Return the modified input string

Error Flows - Summary: The method lacks error handling for invalid or malformed input strings. - No explicit error handling, No validation for input strings, No exception handling for malformed inputs

Security Issues - Summary: Unvalidated input risks ReDoS via regex processing. - Unvalidated input

Performance Issues - Summary: Optimize regex options and reduce repeated string replacements to improve performance. - Unnecessary use of 'Multiline' and 'Singleline' regex options, Performance overhead from iterating regex matches with repeated string replacements

Maintainability Issues - Summary: The method lacks completeness, clarity, and flexibility, hindering maintainability. - Incomplete method implementation, Non-standard method naming, Undocumented regular expression pattern and options, Non-descriptive variable names, Hardcoded replacement string reduces flexibility, Poorly formatted and incomplete code snippets

Test Case Ideas - Summary: Verify correct JSON date parsing and assess performance with large inputs. - Correctly parse and replace JSON date strings, Measure performance impact on large inputs with many date matches

Dependencies & Called Services - Summary: Uses Regex and String for JSON date parsing. - Regex for pattern matching, String manipulation

UpdateProject

Summary: UpdateProject checks project existence, updates details if absent, and returns status JSON.

JsonResult ProjectsController.UpdateProject()

Routing

  • HTTP: POST
  • URL: /Projects/UpdateProject

Cross-layer call chain - ProjectsController.UpdateProject → Andromeda.Core.Services.Registry.UpdatePermissions - ProjectsController.UpdateProject → Andromeda.Core.Services.Registry.setProjectDetails - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_Registry_UpdatePermissions["Andromeda.Core.Services.Registry.UpdatePermissions"]
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    ProjectsController_UpdateProject["ProjectsController.UpdateProject"]
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProjectsController_UpdateProject --> Andromeda_Core_Services_Registry_UpdatePermissions
    ProjectsController_UpdateProject --> Andromeda_Core_Services_Registry_setProjectDetails
Detailed Analysis

Key Flows - Summary: UpdateProject checks project existence - updates details if absent - and returns status JSON. - Check project existence with model.CheckIfProjectExists - Return success JSON if project exists - Set updated details in Registry - Return JSON with update status - Update project details via model.UpdateProjectDetails if not existing

Error Flows - Summary: Handle null checks - Incomplete or incorrect null and empty string checks on project fields - Return JSON error if project name already exists to prevent duplicates

Security Issues - Summary: UpdateProject risks SQL injection - and insecure permission updates. - Use of hardcoded or unvalidated project roles when updating permissions

Performance Issues - Summary: Excessive data type conversions and unoptimized data retrieval degrade performance. - Unoptimized GetProjectDetails method for large datasets

Maintainability Issues - Summary: Refactor code to improve readability, flexibility, and reduce hardcoded dependencies. - Excessive parameters in UpdateProjectDetails method

UX Impact Notes - Summary: Ensure accurate data and clear feedback to prevent UI errors and inform users. - Incorrect or missing request data causes UI errors, JSON responses provide success or failure feedback, Incomplete code blocks error messages and validation feedback

Test Case Ideas - Summary: Verify UpdateProject handles POST requests - updates projects - and returns correct JSON responses. - Handle HTTP POST requests and return JsonResult - Handle missing or malformed form data - Verify CheckIfProjectExists with existing and non-existing projects - Return correct JSON response based on project existence - Set project details properly with setProjectDetails - Return JSON response correctly after updates - Update project details correctly via UpdateProjectDetails

Dependencies & Called Services - Summary: UpdateProject uses core utilities and interfaces for project data handling. - Character utilities, Type conversion, Project model interface, Service registry, String utilities

UpdateProjectGovernance

Summary: UpdateProjectGovernance processes form data, manages governance record states, and returns update status.

JsonResult ProjectsController.UpdateProjectGovernance()

Routing

  • HTTP: POST
  • URL: /Projects/UpdateProjectGovernance

Cross-layer call chain - ProjectsController.UpdateProjectGovernance → Andromeda.Core.Entities.Membership.GetAllUsers - ProjectsController.UpdateProjectGovernance → Andromeda.Core.Entities.ProjectGovernance.getModelCreationUsers - ProjectsController.UpdateProjectGovernance → Andromeda.Core.Entities.ProjectGovernance.getModelSignOffUsers - ProjectsController.UpdateProjectGovernance → Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignUsers - ProjectsController.UpdateProjectGovernance → Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignApprovalUsers

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getModelCreationUsers["Andromeda.Core.Entities.ProjectGovernance.getModelCreationUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getModelSignOffUsers["Andromeda.Core.Entities.ProjectGovernance.getModelSignOffUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignApprovalUsers["Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignApprovalUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignUsers["Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignUsers"]
    ProjectsController_UpdateProjectGovernance["ProjectsController.UpdateProjectGovernance"]
    ProjectsController_UpdateProjectGovernance --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_UpdateProjectGovernance --> Andromeda_Core_Entities_ProjectGovernance_getModelCreationUsers
    ProjectsController_UpdateProjectGovernance --> Andromeda_Core_Entities_ProjectGovernance_getModelSignOffUsers
    ProjectsController_UpdateProjectGovernance --> Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignApprovalUsers
    ProjectsController_UpdateProjectGovernance --> Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignUsers
Detailed Analysis

Key Flows - Summary: UpdateProjectGovernance processes form data - and returns update status. - Delete pending governance records if present - Mark pre-approved record deleted if IsEditApproveRec is set - Set governance stage to 'PendingForApprove' if conditions unmet - Return JSON result with update outcome - Update CreatedBy field on current governance record

Error Flows - Summary: Handle null references - and exceptions during project governance updates. - Null reference exception on gov.Stage update

Security Issues - Summary: UpdateProjectGovernance risks injection attacks and unauthorized access due to missing input validation and access checks. - Unauthorized access risk when updating project user roles without access checks

Performance Issues - and batch email sending for performance. - Email sending in loop for large user lists

Maintainability Issues - Summary: Replace hardcoded values and magic strings with constants; simplify complex queries and fix incomplete code. - Replace magic strings for date formats and culture names with constants or enums, Remove hardcoded governance stage values to improve flexibility, Decouple from Andromeda.Core.GovernanceStage enum and processModel object, Simplify complex nested LINQ queries and use meaningful variable names, Complete incomplete code segments and ensure all method calls and class references are defined

UX Impact Notes - Summary: Governance date changes notify users via email, affecting workflow and navigation. - Email sending failures impacting user experience

Test Case Ideas - Summary: Validate data handling - Delete preApproved records when IsEditApproveRec is true, Delete pending governance records correctly - Handle missing or empty form data - Set governanceStage Approved property to true - Return JSON result successfully - Update governance stage to PendingForApprove

Dependencies & Called Services - Summary: UpdateProjectGovernance uses data conversion - DateTime conversion, Enumerable operations, List collection, IMembershipService interface, IProcessModel interface, IProjectModel interface, Membership entity, ProjectGovernance entity, String operations, Object base type

ApproveProjectGovernance

Summary: Approve pending project governance by validating conditions, updating state, and returning a redirect URL.

JsonResult ProjectsController.ApproveProjectGovernance()

Routing

  • HTTP: POST
  • URL: /Projects/ApproveProjectGovernance

Cross-layer call chain - ProjectsController.ApproveProjectGovernance → Andromeda.Core.DataManager.Execute - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    ProjectsController_ApproveProjectGovernance["ProjectsController.ApproveProjectGovernance"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProjectsController_ApproveProjectGovernance --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - and returning a redirect URL. - Fetch pending governance object by IDs - Invoke 'nce' method with updated governance object - Return JSON response with redirect URL - Validate governance approval conditions

Error Flows - Summary: Handle governance ID validation failures and missing governance objects to prevent errors. - Skip update and approval if governance object is missing or invalid

Security Issues - Summary: Validate and sanitize user input to prevent SQL injection and data tampering. - Potential data tampering via unvalidated input

Performance Issues - Summary: Using FirstOrDefault for governance data retrieval causes slow queries on large datasets. - Slow queries on large datasets

Maintainability Issues - complete conditionals and returns - Complete return statements to avoid compilation errors

UX Impact Notes - Summary: Updating governance stage redirects user to project display with success feedback. - Return JSON with redirect URL to '/Projects/Display' - Redirect user after governance update

Test Case Ideas - Summary: Test governance approval logic - Check robustness against missing or malformed request data - Validate approval with valid governance IDs - Confirm governance stage updates on approval

Dependencies & Called Services - Summary: Uses Enumerable conversion to process IProjectModel collections. - Enumerable conversion, IProjectModel processing

ChangeBaseProject

Summary: ChangeBaseProject updates the root and project ID based on the MakeAsRoot flag and adjusts mapping details accordingly.

JsonResult ProjectsController.ChangeBaseProject()

Routing

  • HTTP: POST
  • URL: /Projects/ChangeBaseProject
Detailed Analysis

Key Flows - Summary: ChangeBaseProject updates the root and project ID based on the MakeAsRoot flag and adjusts mapping details accordingly. - Reset root to zero if MakeAsRoot is false or unset - Update current project ID to selected project ID - Update mapping details after project ID change

Error Flows - Summary: Handle input conversion and lookup errors to prevent runtime exceptions. - Check existence before using First() to avoid exceptions on missing projects - Ensure code completeness to prevent unexpected runtime errors - Validate and safely convert request form values to integers and booleans

Security Issues - Summary: Direct use of unvalidated request data risks SQL injection and XSS vulnerabilities. - Unvalidated Request.Form and Request usage

Performance Issues - Summary: Optimize database calls and LINQ usage to prevent performance degradation and infinite loops. - Repeated database or model calls inside loops degrade performance, LINQ methods Any(), First(), Where() inside loops cause O(n^2) complexity on large collections, Infinite loop risk if curentPrjID and curentRoot do not converge in while loop

Maintainability Issues - Summary: Fix typos, remove incomplete code, decouple dependencies, improve error handling, and clarify variables. - Lack of error handling in critical operations like database updates

UX Impact Notes - Summary: Method returns JSON responses that control user flow and error handling. - JSON responses affecting user flow and redirects - Hardcoded or incomplete return values causing UI confusion

Test Case Ideas - Summary: Verify ChangeBaseProject updates parent-child relations - Test with 'MakeAsRoot' checked and unchecked - Validate parent-child relation updates when 'MakeAsRoot' is true - Validate root and project ID reset when 'MakeAsRoot' is false

Dependencies & Called Services - Summary: Uses collections and interfaces to process and convert project models. - Enumerable conversion, IProcessModel interface, IProjectModel interface, List collection, Projects data

GetMappingDetails

Summary: Retrieve latest revisions of child and parent projects, filter mappings, and find corresponding organization records.

List<Mapping> ProjectsController.GetMappingDetails(int ChildProjID, int ParentProjID, List<Mapping> currentMappingDetails, List<Project> Projects)

Routing

  • URL: /Projects/GetMappingDetails

Cross-layer call chain - ProjectsController.GetMappingDetails → Andromeda.Core.DataManager.GetDataList

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetDataList["Andromeda.Core.DataManager.GetDataList"]
    ProjectsController_GetMappingDetails["ProjectsController.GetMappingDetails"]
    ProjectsController_GetMappingDetails --> Andromeda_Core_DataManager_GetDataList
Detailed Analysis

Key Flows - Summary: Retrieve latest revisions of child and parent projects, filter mappings, and find corresponding organization records. - Retrieve latest parent project revision, Filter mappings for parent's latest revision and project ID, Find organization records matching each filtered mapping in newMapping

Error Flows - Summary: Handle null references and avoid returning null mappings to prevent downstream errors. - Returning null mappings when organization records are absent

Performance Issues - Summary: Inefficient LINQ usage causes slow performance and high memory use on large datasets. - Inefficient use of FirstOrDefault and Where on large datasets - ToList causes large memory allocations with big data sets

Maintainability Issues - Summary: Inconsistent and undefined variable names reduce code clarity and cause errors. - Undefined variables, Inconsistent variable naming, Truncated variable names causing confusion, Potential compilation errors

UX Impact Notes - Summary: No UX impact identified for GetMappingDetails method.

Test Case Ideas - Summary: Verify mapping filtering, handling of missing parents, empty inputs, multiple matches, and safe LatestRevision access. - Filter mappings by ChildProjID and ParentProjID, Select correct mapping with multiple matches in newMapping, Access LatestRevision properties safely and correctly - Handle missing ParentProjID in Projects - Process empty currentMappingDetails and newMapping collections

Dependencies & Called Services - Summary: Uses Enumerable for collection manipulation. - Enumerable dependency for collection operations

ProjectAdmin

Summary: Load and assign project governance, tags, groups, and child projects data to view properties.

ActionResult ProjectsController.ProjectAdmin()

Routing

  • HTTP: GET
  • URL: /Projects/ProjectAdmin

Cross-layer call chain - ProjectsController.ProjectAdmin → Andromeda.Core.Entities.Membership.GetAllUsers - ProjectsController.ProjectAdmin → Insorce.Models.UserProfile.GetUserProfile - ProjectsController.ProjectAdmin → Andromeda.Core.Extensions.LinqExtensions.UserDisplayName - ProjectsController.ProjectAdmin → Andromeda.Core.Entities.Project.GetTags

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    Andromeda_Core_Extensions_LinqExtensions_UserDisplayName["Andromeda.Core.Extensions.LinqExtensions.UserDisplayName"]
    Insorce_Models_UserProfile_GetUserProfile["Insorce.Models.UserProfile.GetUserProfile"]
    ProjectsController_ProjectAdmin["ProjectsController.ProjectAdmin"]
    ProjectsController_ProjectAdmin --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_ProjectAdmin --> Andromeda_Core_Entities_Project_GetTags
    ProjectsController_ProjectAdmin --> Andromeda_Core_Extensions_LinqExtensions_UserDisplayName
    ProjectsController_ProjectAdmin --> Insorce_Models_UserProfile_GetUserProfile
View Metadata
  • View: ProjectAdmin (Andromeda.Web\Views\Projects\ProjectAdmin.cshtml)
  • Model: IEnumerable<Andromeda.Core.Entities.SyncHistory>
Detailed Analysis

Key Flows - Summary: Load and assign project governance - Assign all data to view properties

Error Flows - Summary: Code errors and type mismatches cause compilation failures and runtime exceptions. - Empty code blocks and incomplete conditionals causing unhandled cases

Security Issues - Summary: ProjectAdmin risks unauthorized data access and SQL injection due to inadequate input validation and authorization. - Information disclosure from unfiltered user retrieval, Authorization bypass from improper organization comparison, SQL injection risk from unsanitized project ID parameters

Performance Issues - Summary: Optimize repeated string comparisons, LINQ usage, and multiple database calls to improve performance. - Repeated string comparisons in loops, Inefficient LINQ methods on large collections, Multiple database calls for project data

Maintainability Issues - Summary: Hardcoded values, syntax errors, naming issues, and incomplete code reduce maintainability. - Use of hardcoded strings and status codes reduces code clarity, Syntax errors and corrupted code snippets hinder readability, Inconsistent variable naming and typos cause confusion, Commented-out and incomplete code requires refactoring, Empty code blocks and incomplete conditionals increase technical debt

UX Impact Notes - Summary: Improve UX by filtering users, clarifying access denial, and optimizing performance. - Set ViewBag properties to control displayed information

Test Case Ideas - Summary: Validate organization name case insensitivity - Case-insensitive organization name validation, Project filtering by status codes, Correct ViewData and ViewBag population, Error-free execution with empty code blocks and incomplete conditionals

Dependencies & Called Services - Summary: Uses collections, interfaces, models, and project-related classes for project administration. - ILoginModel interface

CreateChildProject

Summary: Extract form data, verify project existence, create child project, update statuses, and copy XML data.

JsonResult ProjectsController.CreateChildProject(FormCollection frm)

Routing

  • HTTP: POST
  • URL: /Projects/CreateChildProject

Cross-layer call chain - ProjectsController.CreateChildProject → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProjectsController_CreateChildProject["ProjectsController.CreateChildProject"]
    ProjectsController_CreateChildProject --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - create child project - update statuses - Check for existing project with child project name in process model - Create new child project if none exists using current project ID and form data - Set ViewBag flags for parent project status and existing requests - Update project status and parent-child relationship if simulation status is true

Error Flows - Summary: Handle errors for duplicate child project names and invalid project IDs. - Halt creation and set error messages for duplicate child project names - Log error and return failure if project ID is 0

Security Issues - Summary: Unvalidated user input risks injection attacks and data tampering. - SQL injection and data tampering risks from unvalidated Request.Form data

Performance Issues - Summary: Optimize costly data retrieval and add error handling to improve performance and reliability. - Costly getSimulationDataById calls, Sequential CopyProjectXML, CopyProjectPatternXML, and ReadProjectXml calls without error handling

Maintainability Issues - Summary: The method uses magic strings and numbers, has unused variables, partial code, and tight coupling, reducing maintainability. - Use of magic strings for request keys, Presence of unused variables indicating redundant code, Partial or incomplete code fragments complicate understanding, Tight coupling with ConfigurationManager and processModel, Use of magic numbers instead of named constants

UX Impact Notes - Summary: Display error messages and JSON responses to guide user flow and UI updates. - Error messages for existing project names, JSON response with project ID and error details affecting UI

Test Case Ideas - Summary: Verify project creation logic - status updates - data assignments - Handle duplicate child project names with ViewBag properties and error messages - Verify nStatus is set to true at correct point - Retrieve and assign project details to ViewBag.CurrProject - Test CheckIfProjectExists with existing and non-existing projects and error handling - Confirm successful child project creation and CreateChild invocation with correct parameters - Assign NewProjectID from created project object - Set ViewBag.IsParent and ViewBag.ExistingRequest properties - Update project status and parent-child relations based on simulation status - Validate presence and correctness of SimId in form data - Validate final JSON response structure and content

Dependencies & Called Services - Summary: CreateChildProject converts models and logs actions using project and process data. - Use LoggingManager for logging

GetConflicts

Summary: GetConflicts handles conflict detection by retrieving child IDs based on SyncID and updates project data if no conflicts exist.

string ProjectsController.GetConflicts(int SyncID)

Routing

  • URL: /Projects/GetConflicts
Detailed Analysis

Key Flows - Summary: GetConflicts handles conflict detection by retrieving child IDs based on SyncID and updates project data if no conflicts exist. - Retrieve new child project ID and set merge conflict message when SyncID is zero - Retrieve existing child ID and set conflict message when SyncID is non-zero - update sync history

Error Flows - Summary: Abort updates and return conflict message if conflicts are detected. - Detect conflicts via CheckConflicts non-zero return - Abort database updates and file copying on conflict - Return conflict message based on SyncID

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

Performance Issues - Summary: Multiple database calls degrade performance without optimization. - Multiple database calls in InsertChanges and UpdateSyncHistory

Maintainability Issues - Summary: Improve variable naming, refactor repeated calls, avoid hardcoded messages, and complete code snippets. - Unclear and inconsistent variable names, Repeated method calls with similar parameters needing refactoring, Hardcoded conflict messages hindering localization and management, Incomplete code snippet obstructing full method understanding

UX Impact Notes - Summary: Display conflict messages and sync errors to inform users and affect their experience. - Conflict messages displayed to users, Synchronization errors impact user experience

Test Case Ideas - database updates - update sync history - Prevent database updates and file copying when conflicts exist - Initialize and assign conflict message variables correctly

Dependencies & Called Services - Summary: GetConflicts depends on IProcessModel and Int32 types. - IProcessModel dependency, Int32 type usage

DiscardGetLatest

Summary: DiscardGetLatest discards child project changes and copies XML from parent if discard condition is met; otherwise, it returns conflict errors and project data as JSON.

JsonResult ProjectsController.DiscardGetLatest(bool Discard)

Routing

  • HTTP: POST
  • URL: /Projects/DiscardGetLatest
Detailed Analysis

Key Flows - it returns conflict errors and project data as JSON. - Check if current project is parent - Return conflict data as JSON response

Error Flows - Summary: Handles conflict errors when discard condition fails - Incomplete code risks undefined method calls and faulty condition checks

Security Issues - Summary: Prevent exposure of sensitive configuration and avoid exploitable incomplete code. - Direct access to system configuration risks exposing sensitive details, Incomplete code segments cause unpredictable behavior exploitable by attackers

Performance Issues - Summary: No performance issues identified for DiscardGetLatest method.

Maintainability Issues - Summary: Hardcoded values and tight coupling reduce code maintainability and clarity. - Tight coupling of method calls and variable assignments complicates modifications

UX Impact Notes - Summary: The method's error handling affects UI updates and user flow consistency. - Error responses affect UI and user flows, Incomplete code causes unexpected behavior and UX errors

Test Case Ideas - Summary: Verify discard behavior, conflict handling, child project ID usage, and method responses. - CheckIFParent and ExistingRequests return expected results reflected in JSON - GetConflicts returns expected error message

Dependencies & Called Services - Summary: Uses process and project models with integer identifiers for project management. - IProcessModel dependency, IProjectModel dependency, Integer identifiers, Project collections

SaveRequest

Summary: SaveRequest saves requests with non-empty MakerComment and returns a redirect URL.

JsonResult ProjectsController.SaveRequest(string MakerComment)

Routing

  • HTTP: POST
  • URL: /Projects/SaveRequest

Cross-layer call chain - ProjectsController.SaveRequest → Andromeda.Core.DataManager.AddParameter - ProjectsController.SaveRequest → Andromeda.Core.DataManager.SP_ExecNonQuery

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_AddParameter["Andromeda.Core.DataManager.AddParameter"]
    Andromeda_Core_DataManager_SP_ExecNonQuery["Andromeda.Core.DataManager.SP_ExecNonQuery"]
    ProjectsController_SaveRequest["ProjectsController.SaveRequest"]
    ProjectsController_SaveRequest --> Andromeda_Core_DataManager_AddParameter
    ProjectsController_SaveRequest --> Andromeda_Core_DataManager_SP_ExecNonQuery
Detailed Analysis

Key Flows - Summary: SaveRequest saves requests with non-empty MakerComment and returns a redirect URL. - Return JSON redirect URL to '/Projects/ProjectAdm' - Update existing requests in ViewBag

UX Impact Notes - Summary: Redirects user to project administration page after saving. - Clear navigation flow post-submission - Redirect to '/Projects/ProjectAdm' after save

Test Case Ideas - Summary: Verify SaveRequest handles MakerComment correctly and returns proper JSON response. - Return JsonResult - Include correct redirect URL in JSON response

Dependencies & Called Services - Summary: SaveRequest depends on IProcessModel and String types. - Dependency on IProcessModel interface, Dependency on String type

ApproveReq

Summary: ApproveReq processes SyncID, detects conflicts, and sets view data for parent status and existing requests.

JsonResult ProjectsController.ApproveReq(int SyncID)

Routing

  • HTTP: POST
  • URL: /Projects/ApproveReq
Detailed Analysis

Key Flows - and sets view data for parent status and existing requests. - Set ViewBag.IsParent using CheckIFParent with current project ID - Set ViewBag.ExistingRequest using ExistingRequests with current project ID

Maintainability Issues - Summary: Remove redundant variable initialization and unify data handling approach. - Redundant initialization of ApproveReqErrorMsg, Inconsistent use of ViewBag and model properties

UX Impact Notes - Summary: Returns JSON to update UI and display messages. - Return JSON result - Update user interface

Test Case Ideas - Summary: Verify ApproveReq method HTTP POST access and correct ViewBag property settings with error handling. - Return correct JSON on GetConflicts error - Set ViewBag.IsParent based on current project - Set ViewBag.ExistingRequest based on current project

Dependencies & Called Services - Summary: ApproveReq uses process and project models to manage project data. - IProcessModel dependency, IProjectModel dependency, Projects data access

RejectReq

Summary: RejectReq processes rejection via POST using SyncID, checks parent status, and retrieves existing requests.

JsonResult ProjectsController.RejectReq(int SyncID)

Routing

  • HTTP: POST
  • URL: /Projects/RejectReq
Detailed Analysis

Key Flows - checks parent status - Check parent status with current project ID - Invoke method via HTTP POST with SyncID, Call RejectRequest with SyncID to reject, Retrieve existing requests with current project ID, store in ViewBag.ExistingRequest

Maintainability Issues - Summary: Rename method to follow C# naming conventions for clarity and consistency. - Non-standard method name 'RejectReq', Rename to 'RejectRequest' for clarity

UX Impact Notes - Summary: The method's JSON result alters user flow by redirecting or showing messages. - Potential user redirection

Test Case Ideas - sets ViewBag correctly - and returns expected JSON. - Set ViewBag.IsParent from CheckIFParent result - Set ViewBag.ExistingRequest from ExistingRequests result - Return expected JSON result

Dependencies & Called Services - Summary: RejectReq depends on IProcessModel and IProjectModel services. - IProcessModel service dependency, IProjectModel service dependency

SaveProjectUserPermission

Summary: SaveProjectUserPermission updates or creates user permissions for a project.

JsonResult ProjectsController.SaveProjectUserPermission(string UserId, char Permission, string UserName)

Routing

  • HTTP: POST
  • URL: /Projects/SaveProjectUserPermission

Cross-layer call chain - ProjectsController.SaveProjectUserPermission → Andromeda.Core.Services.Registry.setProjectDetails - ProjectsController.SaveProjectUserPermission → Andromeda.Core.Services.SignalRMsg.SendMessage - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString - Andromeda.Core.Services.SignalRMsg.SendMessage → Andromeda.Core.LoggingManager.Info - Andromeda.Core.Services.SignalRMsg.SendMessage → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Services_SignalRMsg_SendMessage["Andromeda.Core.Services.SignalRMsg.SendMessage"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    ProjectsController_SaveProjectUserPermission["ProjectsController.SaveProjectUserPermission"]
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Info
    ProjectsController_SaveProjectUserPermission --> Andromeda_Core_Services_Registry_setProjectDetails
    ProjectsController_SaveProjectUserPermission --> Andromeda_Core_Services_SignalRMsg_SendMessage
Detailed Analysis

Key Flows - Summary: SaveProjectUserPermission updates or creates user permissions for a project. - Check user authorization - Return operation result - Update or create permission record - Validate input data

Error Flows - Summary: Incomplete code causes runtime errors and unexpected behavior. - Incomplete if statements, Malformed method calls, Runtime errors, Unexpected behavior

Security Issues - Summary: The method risks unauthorized access due to weak permission checks and insufficient input validation. - Potential authentication bypass from improper LoggedInUser validation

Maintainability Issues - Summary: Fix incomplete code and variable name typos to ensure maintainability and prevent errors. - Incomplete audit log code indicating missing or broken implementation

UX Impact Notes - Summary: Prevents unauthorized self-assignment and notifies users of permission updates. - Error message blocks unauthorized self-assignment as process owner - Real-time permission update notifications via SignalR

Test Case Ideas - Summary: Verify SignalR message sending and conditional project detail updates. - SignalR message sending with correct group and properties - Conditional update of project details based on r.Id values

Dependencies & Called Services - Summary: Uses models, messaging, and system registry for saving user permissions. - IProcessModel dependency, IProjectModel dependency, SignalRMsg messaging, Registry access, Int32 data type, Char data type

RepairProject

Summary: Retrieve project data and error counts, set view properties, and return the view.

ActionResult ProjectsController.RepairProject(int? isRedirect)

Routing

  • HTTP: GET
  • URL: /Projects/RepairProject
View Metadata
  • View: RepairProject (Andromeda.Web\Views\Projects\RepairProject.cshtml)
  • Model: IList<Andromeda.Validation.VisioError>
Detailed Analysis

Key Flows - set view properties - and return the view. - Set ViewBag with product volume errors and ViewData with team actors - Return the view

Error Flows - Summary: Redirects handle empty activities and error-free conditions to appropriate pages. - Redirect to 'ProcessCreation' if activities collection is empty - Redirect to 'InputSummary' if no errors and redirect condition met

Performance Issues - Summary: Counting and filtering large collections degrade performance. - Use of LINQ Any() and Where() on large error datasets

Maintainability Issues - Summary: Fix typos, clarify variables, correct conditionals, and avoid magic strings for maintainability. - Typo in variable name 'isRedirec' instead of 'isRedirect'

UX Impact Notes - Summary: Redirects guide users through setup and display relevant errors to improve workflow. - Display product volume errors and team actors for user awareness - Redirect to ProcessCreation when no activities exist - Redirect to InputSummary to streamline navigation if no errors

Test Case Ideas - and correct redirection behavior. - Calculate and store error count in ViewData - Handle large activity collections for performance and correctness - Redirect to ProcessCreation on empty activities - Redirect to ProcessCreation only when activities count is zero - Return expected activities from GetActivities - Assign ErrCnt to appropriate data structure - Conditional redirection based on ErrCnt and isRedirect values - Avoid redirect to InputSummary when t.Value is not 1 - Set ViewBag.productVolumeErrors correctly on errors - Set ViewData.Teams correctly from GetActors list

Dependencies & Called Services - Summary: Uses core interfaces and collections for project repair operations. - Enum usage, Enumerable collections, IActorModel interface, IProcessModel interface, IProjectModel interface

DeleteTeam

Summary: DeleteTeam removes the actor if no activities exist, handling missing files appropriately.

JsonResult ProjectsController.DeleteTeam(int ActorID, int ProjectId)

Routing

  • URL: /Projects/DeleteTeam
Detailed Analysis

Key Flows - Summary: DeleteTeam removes the actor if no activities exist, handling missing files appropriately. - Delete actor even if project XML file is missing - Return false if activities exist for ActorID without modifying files

Error Flows - Summary: DeleteTeam lacks error handling for XML parsing, missing elements, and file operations. - No exception handling for invalid or unparseable XML files, Missing SwimLane element leads to incomplete removal but proceeds with save and delete, No error handling for file I/O or deletion failures

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

Performance Issues - Summary: Using 'Any' on large activities collections degrades performance. - Inefficient use of 'Any' on large activities collection

Maintainability Issues - Summary: Improve maintainability by using constants, fixing conditionals, and renaming variables. - Replace magic strings for file paths and extensions with constants or configuration, Remove redundant StreamReader.Close() calls since Dispose closes streams, Fix incomplete or malformed conditional statements, Rename poorly named variables to improve readability

UX Impact Notes - Summary: The user receives a clear JSON response indicating deletion success or failure. - JSON response with deletion success status, Clear user feedback on operation outcome

Test Case Ideas - Summary: Verify DeleteTeam handles file existence - Return false if activity with matching ActorId exists

Dependencies & Called Services - Summary: Uses XML processing, file reading, and data conversion utilities. - Process model interface IProcessModel - XML processing with XContainer and XElement, File and stream reading with File, StreamReader, TextReader, Data conversion with Convert and Enumerable Extensions, Integer type Int32

ImplementingDecision

Summary: Fetch project activities and redirect based on conditions; otherwise, display sorted optimization history.

ActionResult ProjectsController.ImplementingDecision()

Routing

  • HTTP: GET
  • URL: /Projects/ImplementingDecision
View Metadata
  • View: ImplementingDecision (Andromeda.Web\Views\Projects\ImplementingDecision.cshtml)
  • Model: IList<Andromeda.Core.Entities.OptimizeHistory>
Detailed Analysis

Key Flows - Summary: Fetch project activities and redirect based on conditions; otherwise - Fetch and sort optimization history by date descending - Redirect to ProcessCreation if activity count condition is met - Return optimization history view

Error Flows - Summary: Handle exceptions from getActivities and manage empty optimization history cases. - Handle exceptions from getActivities method - Manage empty optimization history scenarios

Security Issues - Summary: Sanitize 'activities' collection to prevent SQL injection and data exposure. - SQL injection risk from unsanitized 'activities' collection, Data exposure risk from improper input handling

Performance Issues - Summary: Count() and OrderByDescending on large datasets degrade performance. - Count() on large 'activities' collection, OrderByDescending sorting and list conversion on large optimization history

Maintainability Issues - unclear logic - Unclear redirection condition complicates logic understanding

UX Impact Notes - Summary: Redirect users to ProcessCreation and display sorted optimization history for relevant project info. - Display sorted optimization history view with project information - Redirect users to ProcessCreation based on conditions

Test Case Ideas - redirections - Return expected result on getActivities success - Avoid redirection when condition not met - Return view correctly when optimization history exists - Handle empty activities collection - Handle large activities collection for performance and correctness - Handle errors when no optimization history - Redirect to ProcessCreation when condition met

Dependencies & Called Services - Summary: Uses Enumerable for collection handling and IActorModel for actor abstraction. - Enumerable for collection operations, IActorModel for actor abstraction

RunSimulation

Summary: Retrieve and convert input parameters, update actors' OutProcessActor based on counts and hours, then run simulation and return JSON.

JsonResult ProjectsController.RunSimulation()

Routing

  • HTTP: POST
  • URL: /Projects/RunSimulation
Detailed Analysis

Key Flows - update actors' OutProcessActor based on counts and hours - then run simulation and return JSON. - Return simulation result as JSON - Update actors' OutProcessActor based on PCount and working hours

Error Flows - Summary: Handle input conversion errors and prevent division by zero in calculations. - Input conversion errors from unvalidated user input

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

Performance Issues - Summary: Optimize database calls and reduce costly operations inside loops to improve performance. - Use of 'Any' method inside loops for actor ID checks

Maintainability Issues - Summary: Use descriptive variable names and avoid magic strings to improve code clarity and maintainability. - Use descriptive variable names instead of 'm' and 'ectId', Avoid magic strings for input parameter names, Provide complete code context for better understanding and maintenance

UX Impact Notes - Summary: The method does not affect user experience. - No user experience impact

Test Case Ideas - Summary: Validate RunSimulation with varied inputs - Conditional logic for PCount and OPCount zero and non-zero cases - Division by zero checks when actor.WorkingHo is zero - Verification of ProcessActor reset to zero and its simulation impact

Dependencies & Called Services - Summary: Uses Convert, Enumerable, and IActorModel for data transformation and actor interactions. - Convert for data type conversion, Enumerable for collection operations, IActorModel for actor-based processing

DeleteSimulation

Summary: DeleteSimulation handles POST requests to delete a simulation record by ID and returns a JSON result.

JsonResult ProjectsController.DeleteSimulation()

Routing

  • HTTP: POST
  • URL: /Projects/DeleteSimulation
Detailed Analysis

Key Flows - Summary: DeleteSimulation handles POST requests to delete a simulation record by ID and returns a JSON result. - Return JSON result indicating deletion outcome

Error Flows - Summary: Handle missing or invalid ID and deletion operation failures explicitly. - or non-integer ID causes conversion failure and unhandled exceptions

Security Issues - Summary: DeleteSimulation risks SQL injection from unsanitized Request['ID']. - Unsanitized Request['ID'] input, SQL injection vulnerability, Lack of input validation and sanitization

Maintainability Issues - Summary: Replace magic string 'ID' with a constant or enum for better maintainability. - Use constant or enum for request key 'ID' to improve code clarity

UX Impact Notes - Summary: Deleting a simulation may disrupt user workflows and data consistency. - Disruption of user workflows, Impact on data consistency

Test Case Ideas - Summary: Verify DeleteSimulation accepts only POST and handles valid and missing IDs correctly. - Handle missing or empty ID parameters robustly - Restrict DeleteSimulation to HTTP POST requests - Validate successful deletion with valid IDs

Dependencies & Called Services - Summary: DeleteSimulation uses Convert and IActorModel services. - Convert service, IActorModel service

DeleteAllSimulation

Summary: The method deletes all simulation records for the current project and returns a JSON response.

JsonResult ProjectsController.DeleteAllSimulation()

Routing

  • HTTP: POST
  • URL: /Projects/DeleteAllSimulation
Detailed Analysis

Key Flows - Summary: The method deletes all simulation records for the current project and returns a JSON response. - Return JsonResult indicating deletion completion

UX Impact Notes - Summary: Provide user feedback via JSON response after deleting all simulation records. - User feedback through JSON response, Confirmation of deletion operation

Test Case Ideas - and returns JsonResult. - Return JsonResult after deletion

Dependencies & Called Services - Summary: DeleteAllSimulation depends on IActorModel service. - Dependency on IActorModel service

Welcome

Summary: Initialize context, determine project ID, check review statuses, set flags, and return view with projects.

ActionResult ProjectsController.Welcome()

Routing

  • HTTP: GET
  • URL: /Projects/Welcome

Cross-layer call chain - ProjectsController.Welcome → Insorce.Models.UserProfile.GetUserProfile - ProjectsController.Welcome → Andromeda.Core.LoggingManager.Exception - ProjectsController.Welcome → Andromeda.Core.Utility.Encrypt.EncryptData

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    Andromeda_Core_Utility_Encrypt_EncryptData["Andromeda.Core.Utility.Encrypt.EncryptData"]
    Insorce_Models_UserProfile_GetUserProfile["Insorce.Models.UserProfile.GetUserProfile"]
    ProjectsController_Welcome["ProjectsController.Welcome"]
    ProjectsController_Welcome --> Andromeda_Core_LoggingManager_Exception
    ProjectsController_Welcome --> Andromeda_Core_Utility_Encrypt_EncryptData
    ProjectsController_Welcome --> Insorce_Models_UserProfile_GetUserProfile
View Metadata
  • View: Welcome (Andromeda.Web\Views\Projects\Welcome.cshtml)
  • Model: IList<Andromeda.Core.Entities.Project>
Detailed Analysis

Key Flows - check review statuses - set flags - and return view with projects. - Check review statuses in FTR - Set ViewData flags based on review statuses - Return view with all projects

Error Flows - Summary: Handle exceptions during token processing and validate node review statuses with early exit. - Exception handling during token decryption and decoding with logging - Generic catch block handling unspecified exceptions - Early return if sub-module statuses are null or unapproved during node review

Security Issues - Summary: Handle le.Token securely to prevent exposure and validation flaws. - Token exposure risk, Token validation issues

Performance Issues - Summary: Optimize repeated data retrievals and conversions inside loops to improve performance. - Repeated FirstOrDefault calls inside loops over FTR, Effort, and Control nodes, Retrieving all projects and simulation data in a single operation, Repeated string-to-integer conversions within loops

Maintainability Issues - and complex logic. - Uninitialized and unused variable declarations, Hardcoded magic strings for domains and organization types, Incomplete and truncated code segments, Tight coupling with processModel and model dependencies, Mixed concerns: data retrieval, encryption, and view construction, Unclear or misspelled variable names, Complex, nested conditional statements, Empty or incomplete code blocks

UX Impact Notes - Summary: Early exits and redirects disrupt user flow and risk exposing sensitive data. - Validation URL redirects affect user flow

Test Case Ideas - project ID logic - data assignment - Handle different organization types including 'General' - Handle empty or incomplete code blocks without errors - Retrieve and assign project-related data to ViewData - Set and reset flags: FTRNodesReviewed

Dependencies & Called Services - Summary: Welcome method uses data conversion, encryption, logging, and multiple service interfaces. - Data conversion utilities, Encryption services, Enumerable collections, Actor model interface, Membership service interface, Project model interface, String operations - Logging management - Process model interface

CustomReport

Summary: Load project data and custom reports, then redirect based on activity count.

ActionResult ProjectsController.CustomReport()

Routing

  • HTTP: GET
  • URL: /Projects/CustomReport
View Metadata
  • View: CustomReport (Andromeda.Web\Views\Projects\CustomReport.cshtml)
  • Model: Andromeda.Core.Entities.ProjectData
Detailed Analysis

Key Flows - then redirect based on activity count. - Check activity count in ProjectData - Load custom reports into ViewData under 'CustomReport' - Redirect to 'ProcessCreation' if activity count is zero - Return 'Proj' view to display custom reports otherwise

Error Flows - Summary: No error flows defined for CustomReport.

Performance Issues - Summary: Unfiltered data retrieval and unoptimized large collection counting degrade performance. - Unfiltered GetCustomReports retrieval, Lack of pagination in GetCustomReports, Unoptimized Count() on large ProjectData.Activities collection

Maintainability Issues - Summary: Fix incomplete conditions and avoid magic strings to improve code clarity and maintainability. - Unclear redirect condition to 'ProcessCreation' - Truncated return statement causing incomplete code

UX Impact Notes - Summary: Redirecting or returning views affects user flow and report presentation clarity. - Redirect to 'ProcessCreation' action disrupts user flow - Returning 'Proj' view presents custom reports

Test Case Ideas - redirects - view returns - Handle empty activity collections - Handle large activity collections for performance - Handle errors despite no explicit error handling - Redirect to ProcessCreation when condition equals zero - Avoid redirect when condition is not met - Return Proj view when no redirect occurs

Dependencies & Called Services - Summary: CustomReport depends on Enumerable and IProjectModel for data operations. - Enumerable for collection processing, IProjectModel for project data access

SaveCustomReport

Summary: SaveCustomReport handles creating or updating a custom report with validation and persistence.

JsonResult ProjectsController.SaveCustomReport()

Routing

  • HTTP: POST
  • URL: /Projects/SaveCustomReport

Cross-layer call chain - ProjectsController.SaveCustomReport → Andromeda.Core.DataManager.ExecuteScalar

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_ExecuteScalar["Andromeda.Core.DataManager.ExecuteScalar"]
    ProjectsController_SaveCustomReport["ProjectsController.SaveCustomReport"]
    ProjectsController_SaveCustomReport --> Andromeda_Core_DataManager_ExecuteScalar
Detailed Analysis

Key Flows - Summary: SaveCustomReport handles creating or updating a custom report with validation and persistence. - Create or update report entity - Handle errors and return status - Persist report to database - Validate input data

Error Flows - Summary: The method lacks error handling for invalid input and model call failures. - No validation of request data, No handling of model call errors

Security Issues - Summary: Direct use of Request data without validation risks SQL injection and data tampering. - Lack of input validation, SQL injection vulnerability, Data tampering risk

Maintainability Issues - Summary: No maintainability issues identified in SaveCustomReport method.

Test Case Ideas - Summary: Verify SaveCustomReport processes POST requests and saves valid reports successfully. - Handle HTTP POST requests correctly - Save reports with valid names and properties

Dependencies & Called Services - Summary: SaveCustomReport depends on IProjectModel service. - IProjectModel service dependency

UpdateCustomReport

Summary: Retrieve report details from the request and locate the custom report by ID for updating.

JsonResult ProjectsController.UpdateCustomReport()

Routing

  • HTTP: POST
  • URL: /Projects/UpdateCustomReport

Cross-layer call chain - ProjectsController.UpdateCustomReport → Andromeda.Core.DataManager.Execute - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    ProjectsController_UpdateCustomReport["ProjectsController.UpdateCustomReport"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProjectsController_UpdateCustomReport --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - Summary: Retrieve report details from the request and locate the custom report by ID for updating. - Extract report details from HTTP request parameters, Identify custom report by report ID - Fetch custom reports list from the model

Error Flows - Summary: Return false JSON on update failure - Handle null - or whitespace SelectedReport 'Cre' property affecting update logic - Return false JSON on update failure or insufficient user roles - Avoid premature false JSON return before update operation

Security Issues - Summary: UpdateCustomReport risks SQL injection - Authorization bypass from unvalidated Registry.CurrentUserRoles

Performance Issues - Summary: Fetching all reports and using ToLower with Contains degrades performance. - Fetching all custom reports with ToList causes high memory usage - Using ToLower and Contains for role checks reduces performance

Maintainability Issues - and incorrect return placement. - Unclear property naming in return statement - Return statement before update operation preventing execution

UX Impact Notes - Summary: Users receive unclear failure responses and premature failure stops report updates. - Premature failure response blocks custom report updates

Test Case Ideas - and update execution order. - Ensure update occurs before return statement

Dependencies & Called Services - Summary: UpdateCustomReport uses membership and project services with data conversion utilities. - IMembershipService dependency, IProjectModel dependency, Enumerable conversion utilities, String manipulation utilities

DeleteCustomReport

Summary: Retrieve and verify the custom report by ID, enforce role and namespace checks, then delete the report.

JsonResult ProjectsController.DeleteCustomReport()

Routing

  • HTTP: POST
  • URL: /Projects/DeleteCustomReport

Cross-layer call chain - ProjectsController.DeleteCustomReport → Andromeda.Core.DataManager.Execute - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    ProjectsController_DeleteCustomReport["ProjectsController.DeleteCustomReport"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProjectsController_DeleteCustomReport --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - enforce role and namespace checks - Delete custom report via model method - Load all custom reports - Return JSON responses on validation

Error Flows - Summary: The method always returns failure without deleting the report due to an early return. - Return failure if report ID is invalid or report not found - Early return prevents report deletion execution

Security Issues - Summary: DeleteCustomReport risks SQL injection and flawed role validation causing permission errors. - Unvalidated user input enables SQL injection and data tampering - Case-insensitive substring role checks cause incorrect permission grants

Performance Issues - Summary: Loading all reports and inefficient role checks degrade performance; unreachable Json call wastes resources. - Inefficient multiple Any() calls with ToLower() and Contains() on user roles, Unreachable Json(false) call before deletion wastes resources - Loading all custom reports into memory before searching

Maintainability Issues - Summary: The method violates separation of concerns and contains confusing, error-prone code. - business logic - and presentation logic - Early return before deletion call causing confusing behavior

UX Impact Notes - but incomplete logic causes inconsistent feedback. - Incomplete logic causes inconsistent deletion feedback - Role-based JSON responses affect UX via permission and namespace checks

Test Case Ideas - role checks - deletion logic - Handle missing SelectedReport in custom reports list - Return valid JsonResult for valid report ID - Return correct JSON for 'administrator' and other namespaces - Return JSON false when deletion is not performed - Prevent deletion due to early return - Case-insensitive role checks without substring false positives

Dependencies & Called Services - Summary: Uses membership and project services with string and enumerable utilities. - IMembershipService usage, IProjectModel usage, String utilities, Enumerable utilities

CustomVisualization

Summary: Retrieve project data, process and clone activity arrows, manage arrow collections, and prepare aggregated metrics for the view.

ActionResult ProjectsController.CustomVisualization()

Routing

  • HTTP: GET
  • URL: /Projects/CustomVisualization

Cross-layer call chain - ProjectsController.CustomVisualization → Andromeda.Core.Entities.Arrow.Clone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    ProjectsController_CustomVisualization["ProjectsController.CustomVisualization"]
    ProjectsController_CustomVisualization --> Andromeda_Core_Entities_Arrow_Clone
View Metadata
  • View: CustomVisualization (Andromeda.Web\Views\Projects\CustomVisualization.cshtml)
Detailed Analysis

Key Flows - Summary: Retrieve project data, process and clone activity arrows, manage arrow collections, and prepare aggregated metrics for the view. - Calculate aggregated metrics: effort, cost, cumulative cost - Check activity count and redirect if conditions met - Clone and update arrows based on incoming and outgoing connections

Error Flows - Summary: Handle null references and complete code to prevent runtime and compilation errors. - Null reference exceptions from unchecked object properties - Runtime exceptions from methods without null checks

Security Issues - Summary: No security issues identified in the analyses.

Performance Issues - Summary: Unfiltered queries, repeated LINQ calls, nested loops, and large collection cloning degrade performance. - Unfiltered GetCustomReports calls cause performance degradation on large datasets

Maintainability Issues - Summary: Complex code and unclear naming reduce readability and maintainability. - Complex nested LINQ queries with anonymous types, Incomplete and partial code snippets, Unclear and non-descriptive variable names, Repeated collection enumeration violating DRY principles, Use of magic strings and numbers without constants or enums, Use of dynamic types and anonymous objects reducing type safety, Complex calculations embedded in single lines, Undefined or unclear variables reducing understandability

UX Impact Notes - Summary: Redirects and data loading impact navigation and UI responsiveness. - Redirect to 'ProcessCreation' action alters navigation flow - Large datasets risk performance degradation and slow responsiveness

Test Case Ideas - redirection logic - Create and populate dynamic objects and anonymous types correctly - Handle empty and populated pData.Activities collections - Redirect to ProcessCreation based on activity count condition - Clone arrows and create new arrows with updated properties

Dependencies & Called Services - Summary: Uses data structures, math operations, and project model interfaces for custom visualization. - Arrow library, Data conversion utilities, Enumerable collections, IProjectModel interface, Integer operations, List collections, Math functions, String operations

ProjectHub

Summary: Fetch current project details and update module status accordingly.

ActionResult ProjectsController.ProjectHub()

Routing

  • URL: /Projects/ProjectHub

Cross-layer call chain - ProjectsController.ProjectHub → Andromeda.Core.Entities.Membership.GetAllUsers - ProjectsController.ProjectHub → Insorce.Models.UserProfile.GetUserProfile

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Insorce_Models_UserProfile_GetUserProfile["Insorce.Models.UserProfile.GetUserProfile"]
    ProjectsController_ProjectHub["ProjectsController.ProjectHub"]
    ProjectsController_ProjectHub --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_ProjectHub --> Insorce_Models_UserProfile_GetUserProfile
View Metadata
  • View: ProjectHub (Andromeda.Web\Views\Projects\ProjectHub.cshtml)
  • Model: Andromeda.Core.Entities.Project
Detailed Analysis

Key Flows - Summary: Fetch current project details and update module status accordingly. - Fetch project details from project model - Retrieve current project ID from registry - Update projectData.ModuleStatus using GetProjectStaus method

Error Flows - Summary: Fix incomplete and incorrect code to prevent compilation and runtime errors. - Incomplete conditional statements, Truncated code lines, Potential compilation errors, Potential runtime exceptions

Security Issues - Summary: Organization-based access control risks unauthorized access from weak string validation. - Case-insensitive string comparisons weaken access control, Use of magic string 'Insorce' without validation risks unauthorized access

Performance Issues - Summary: FirstOrDefault() on large governance lists causes inefficiency. - Inefficient use of FirstOrDefault() on large governance lists

Maintainability Issues - Summary: Incomplete code, typos, and magic strings reduce maintainability and increase bugs. - Incomplete and syntactically incorrect code fragments, Typographical errors causing confusion and bugs, Use of magic string instead of named constant for organization comparisons

UX Impact Notes - user checks - User membership checks affecting redirection and error messages

Test Case Ideas - status updates - organization logic - and ViewData assignments. - Validate projectData.ModuleStatus updates from GetProjectStatus - Verify GetProjectDetails called with correct project ID and returns expected data - Test organization comparison logic with varied cases and names - Test ViewData assignments for governance and approval statuses

Dependencies & Called Services - Summary: Uses collections and interfaces for actor, process, project models, and membership management. - Enumerable for collection operations, IActorModel interface, IProcessModel interface, IProjectModel interface, List collection, Membership management, String data type

SendforReview

Summary: Retrieve project governance for approval, insert approval records with comments, and return success response.

JsonResult ProjectsController.SendforReview()

Routing

  • HTTP: POST
  • URL: /Projects/SendforReview

Cross-layer call chain - ProjectsController.SendforReview → Andromeda.Core.Entities.Membership.GetAllUsers - ProjectsController.SendforReview → Andromeda.Core.Entities.ProjectGovernance.getModelSignOffUsers - ProjectsController.SendforReview → Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignApprovalUsers

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getModelSignOffUsers["Andromeda.Core.Entities.ProjectGovernance.getModelSignOffUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignApprovalUsers["Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignApprovalUsers"]
    ProjectsController_SendforReview["ProjectsController.SendforReview"]
    ProjectsController_SendforReview --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_SendforReview --> Andromeda_Core_Entities_ProjectGovernance_getModelSignOffUsers
    ProjectsController_SendforReview --> Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignApprovalUsers
Detailed Analysis

Key Flows - and return success response. - Return JSON success response

Error Flows - Summary: Handle invalid or missing 'Module' values and complete error handling conditions. - Complete conditional statements for error handling - Handle invalid or missing 'Module' form values

Security Issues - Summary: Sanitize inputs to prevent enum parsing, XSS, and email injection vulnerabilities. - Enum parsing vulnerability from unvalidated 'Module' form value

Performance Issues - Summary: Optimize data retrieval and filtering to prevent slowdowns with large datasets. - Inefficient iteration in GetProjectGovernance with large datasets

Maintainability Issues - Summary: Replace magic strings and characters with constants; decouple dependencies; fix incomplete code for maintainability. - Replace magic strings with enums or constants, Replace magic characters with named constants, Avoid magic strings in form fields and email construction, Decouple code from processModel and HttpContext, Fix incomplete and unclear code snippets and method calls

UX Impact Notes - Summary: SendforReview sends structured emails and JSON responses that influence user actions and flow. - URL construction affects redirection and user flow

Test Case Ideas - status updates - Project status updates for governance modules and stages

Dependencies & Called Services - Summary: SendforReview uses data conversion - Data conversion utilities, DateTime handling, Enum usage, Enumerable collections, IMembershipService interface, IProcessModel interface, IProjectModel interface, Integer types, List collections, Membership domain model, ProjectGovernance domain model, String manipulation

ApproveReview

Summary: ApproveReview updates project status, manages governance approvals, sends notifications, and returns success.

JsonResult ProjectsController.ApproveReview()

Routing

  • HTTP: POST
  • URL: /Projects/ApproveReview

Cross-layer call chain - ProjectsController.ApproveReview → Andromeda.Core.Entities.ProjectGovernance.getModelCreationUsers - ProjectsController.ApproveReview → Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignUsers - ProjectsController.ApproveReview → Andromeda.Core.Entities.Membership.GetAllUsers

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getModelCreationUsers["Andromeda.Core.Entities.ProjectGovernance.getModelCreationUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignUsers["Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignUsers"]
    ProjectsController_ApproveReview["ProjectsController.ApproveReview"]
    ProjectsController_ApproveReview --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_ApproveReview --> Andromeda_Core_Entities_ProjectGovernance_getModelCreationUsers
    ProjectsController_ApproveReview --> Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignUsers
Detailed Analysis

Key Flows - Summary: ApproveReview updates project status - sends notifications - and returns success. - Create child project if needed - Send notification emails - Return success JSON - Update project and freeze status

Error Flows - Summary: Incomplete conditions and missing null checks cause exceptions and unexpected behavior. - Incomplete condition checks involving 'gov' and 'n' - Incomplete assignment of projectId from 'proj' - Missing null checks for 'proj' and 'stry' causing null reference exceptions - Unvalidated enum parsing from request form data causing exceptions

Security Issues - Summary: Sanitize inputs to prevent enum parsing, SQL injection, XSS, and email injection vulnerabilities. - Sanitize comments before database insertion, Sanitize user input in email bodies to prevent XSS, Sanitize email content to prevent email injection - Validate 'Module' form data before enum parsing

Performance Issues - and email sending loops for performance. - Multiple email sends inside loops causing bottlenecks

Maintainability Issues - Summary: Incomplete code, magic strings, unclear naming, and typos reduce maintainability and cause errors. - Incomplete or truncated code statements, Use of magic strings and hardcoded values, Inconsistent and unclear variable naming, Potential typos and incomplete variable names causing errors

UX Impact Notes - Summary: Approval process affects user experience through status changes, navigation, and notifications. - Errors in parsing or data retrieval degrade user experience, Project and freeze status changes impact user workflow, Constructed project URLs influence user navigation, Email notifications inform users of approval status, Email formatting affects readability and engagement

Test Case Ideas - Summary: Verify URL construction and JSON response correctness after approval. - URL construction with various project IDs and components, JSON response with Success true and correct project ID

Dependencies & Called Services - Summary: ApproveReview uses services and models for membership, project governance, and data processing. - Membership service interface, Project model interface, Project governance model, Membership model, DateTime conversion, Enum conversion, Enumerable operations, List data structure, Integer type, String type, Object type - Process model interface

RejectReview

Summary: RejectReview handles the process of rejecting a review, updating status, and notifying stakeholders.

JsonResult ProjectsController.RejectReview()

Routing

  • HTTP: POST
  • URL: /Projects/RejectReview

Cross-layer call chain - ProjectsController.RejectReview → Andromeda.Core.Entities.ProjectGovernance.getModelCreationUsers - ProjectsController.RejectReview → Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignUsers - ProjectsController.RejectReview → Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignApprovalUsers - ProjectsController.RejectReview → Andromeda.Core.Entities.Membership.GetAllUsers

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getModelCreationUsers["Andromeda.Core.Entities.ProjectGovernance.getModelCreationUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignApprovalUsers["Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignApprovalUsers"]
    Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignUsers["Andromeda.Core.Entities.ProjectGovernance.getSolutionDesignUsers"]
    ProjectsController_RejectReview["ProjectsController.RejectReview"]
    ProjectsController_RejectReview --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_RejectReview --> Andromeda_Core_Entities_ProjectGovernance_getModelCreationUsers
    ProjectsController_RejectReview --> Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignApprovalUsers
    ProjectsController_RejectReview --> Andromeda_Core_Entities_ProjectGovernance_getSolutionDesignUsers
Detailed Analysis

Key Flows - Summary: RejectReview handles the process of rejecting a review - Log rejection action for audit - Notify stakeholders of rejection - Update review status to rejected

Error Flows - Summary: Handle missing or invalid data causing enum errors and null user or governance lists affecting notifications. - Null or empty governance data affecting status updates

Security Issues - Summary: RejectReview risks enum parsing, SQL injection, and email injection attacks from unsanitized inputs. - Enum parsing vulnerability from unvalidated request form data

Performance Issues - Summary: Optimize user filtering and email construction to improve performance. - Inefficient user filtering due to Contains method inside loop, Performance impact from repeated string concatenation in email construction

Maintainability Issues - Summary: Magic strings, typos, unclear variables, and incomplete code reduce maintainability and clarity. - Hardcoded strings in email body hinder localization and updates

UX Impact Notes - Summary: Rejecting review redirects user and triggers potentially flawed email notifications. - User redirected to project hub after review rejection

Test Case Ideas - Summary: Verify InsertGovernanceApprovals call and JSON success response after rejection. - Method returns JSON object with Success set to true after rejection

Dependencies & Called Services - Summary: RejectReview uses services and models for membership, project governance, and data conversion. - Membership service interface, Project governance model, Project model interface, Data type conversions (DateTime, Enum, Int32), Enumerable collections

UpdateTargetObjectives

Summary: Process POST request to create and store TargetObjectives, then return success JSON.

JsonResult ProjectsController.UpdateTargetObjectives()

Routing

  • HTTP: POST
  • URL: /Projects/UpdateTargetObjectives
Detailed Analysis

Key Flows - Summary: Process POST request to create and store TargetObjectives - then return success JSON. - Create and populate TargetObjectives object - Return JSON success response

Error Flows - Summary: Handle data validation and database insertion errors to prevent unhandled exceptions. - Lack of validation for form data type conversion, No error handling for database insertion failures

Security Issues - Summary: UpdateTargetObjectives risks SQL injection due to unsanitized input. - Unsanitized form data usage, Potential SQL injection vulnerability

Performance Issues - Summary: No performance issues identified in UpdateTargetObjectives method.

Maintainability Issues - Summary: Replace magic strings with constants to improve maintainability and reduce errors. - Use constants for form field names, Avoid magic strings to prevent errors when fields change

UX Impact Notes - Summary: The method returns JSON without error handling - Silent failure during update

Test Case Ideas - Summary: Verify UpdateTargetObjectives processes POST requests - updates objectives - and returns success JSON. - Invoke UpdateTargetObjectives on HTTP POST - Return JSON result indicating success - Update target objectives with valid data

Dependencies & Called Services - Summary: Convert IProjectModel for target objectives update. - Convert IProjectModel

ClusterAnalysis

Summary: Fetch project data, group activities by actor, retrieve standardization, evaluate clusters, and extract the best cluster key.

ActionResult ProjectsController.ClusterAnalysis()

Routing

  • HTTP: GET
  • URL: /Projects/ClusterAnalysis

Cross-layer call chain - ProjectsController.ClusterAnalysis → Andromeda.Core.Services.KClusters.MinCluster - ProjectsController.ClusterAnalysis → Insorce.Helpers.ClusterHelper.GenerateCluster - Insorce.Helpers.ClusterHelper.GenerateCluster → Andromeda.Core.Services.KClusters.RunClustering - Insorce.Helpers.ClusterHelper.GenerateCluster → Insorce.Helpers.InsorceOpenAICalls.GenerateClusterResponse - Insorce.Helpers.ClusterHelper.GenerateCluster → Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialCharwithSpace

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace["Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialCharwithSpace"]
    Andromeda_Core_Services_KClusters_MinCluster["Andromeda.Core.Services.KClusters.MinCluster"]
    Andromeda_Core_Services_KClusters_RunClustering["Andromeda.Core.Services.KClusters.RunClustering"]
    Insorce_Helpers_ClusterHelper_GenerateCluster["Insorce.Helpers.ClusterHelper.GenerateCluster"]
    Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse["Insorce.Helpers.InsorceOpenAICalls.GenerateClusterResponse"]
    ProjectsController_ClusterAnalysis["ProjectsController.ClusterAnalysis"]
    Insorce_Helpers_ClusterHelper_GenerateCluster --> Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace
    Insorce_Helpers_ClusterHelper_GenerateCluster --> Andromeda_Core_Services_KClusters_RunClustering
    Insorce_Helpers_ClusterHelper_GenerateCluster --> Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse
    ProjectsController_ClusterAnalysis --> Andromeda_Core_Services_KClusters_MinCluster
    ProjectsController_ClusterAnalysis --> Insorce_Helpers_ClusterHelper_GenerateCluster
View Metadata
  • View: ClusterAnalysis (Andromeda.Web\Views\Projects\ClusterAnalysis.cshtml)
Detailed Analysis

Key Flows - Summary: Fetch project data, group activities by actor, retrieve standardization, evaluate clusters, and extract the best cluster key. - Check or generate cluster evaluation using ClusterHelper - Group activities by ActorId and assign actor names

Error Flows - Summary: Handle missing project ID and null references to prevent runtime errors. - Null reference risks from unchecked variables like 'am' and 'actData'

Performance Issues - Summary: Repeated database calls and full collection enumerations degrade performance on large datasets. - Memory-intensive GroupBy and ToList usage on large datasets

Maintainability Issues - Summary: Tight coupling and unclear naming reduce code maintainability and clarity. - Tight coupling with multiple models complicates maintenance, Non-descriptive variable names reduce code clarity, Misspelled method name causes confusion and errors, Commented-out code indicates dead or abandoned functionality

UX Impact Notes - Summary: Populated ViewData objects directly affect cluster analysis UI presentation. - ViewData objects influence cluster analysis UI, UI presentation depends on ViewData content

Test Case Ideas - property assignments - Confirm GetStandardizationData returns and assigns expected data - Assign KmeansKey correctly from cluster evaluation - Handle empty datasets for project IDs with no data - Update TextId property with actor names properly - Validate data retrieval with valid project ID

Dependencies & Called Services - Summary: Uses cluster helper and interfaces for actor, control, and process models. - ClusterHelper usage, Enumerable usage, IActorModel interface, IControlModel interface, IProcessModel interface

SaveDefaultCluster

Summary: Convert form value to integer selId, save configuration, perform cluster analysis, and return JSON results.

JsonResult ProjectsController.SaveDefaultCluster()

Routing

  • HTTP: POST
  • URL: /Projects/SaveDefaultCluster
Detailed Analysis

Key Flows - and return JSON results. - Return JSON results

Error Flows - Summary: Handle missing or invalid form values to prevent exceptions and skipped processing. - Unhandled null or non-integer form value at Request.Form[0]

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

Performance Issues - Summary: No performance issues identified in SaveDefaultCluster method.

Maintainability Issues - Summary: Refactor magic numbers, strings, unclear constants, and repetitive calls for clarity and maintainability. - Magic number (0) used as Request.Form index reduces clarity, Magic strings ('Cluster', 'K-means') used instead of constants or enums, Undefined or unclear constants hinder understanding, Repetitive method calls with similar parameters reduce readability

UX Impact Notes - Summary: Handles missing cluster data and updates UI with analysis results. - Conditional check skips cluster analysis if 'ActivityClusters' field is missing or null - Returns JSON results to update user interface based on cluster analysis

Test Case Ideas - Summary: Validate input handling - configuration settings - _KmeansKey set correctly - Method returns expected JSON result

Dependencies & Called Services - Summary: SaveDefaultCluster uses data conversion and interfaces for actor, control, and process models. - Data conversion utilities, Enumerable collections, Actor model interface, Control model interface - Process model interface

MergeProjects

Summary: MergeProjects consolidates multiple projects into one, resolving conflicts and preserving data integrity.

ActionResult ProjectsController.MergeProjects()

Routing

  • HTTP: GET
  • URL: /Projects/MergeProjects
View Metadata
  • View: MergeProjects (Andromeda.Web\Views\Projects\MergeProjects.cshtml)
Detailed Analysis

Key Flows - Summary: MergeProjects consolidates multiple projects into one, resolving conflicts and preserving data integrity. - Identify projects to merge, Resolve data conflicts, Consolidate project data, Preserve data integrity - Update references and dependencies

Security Issues - Summary: No security concerns identified in MergeProjects method.

Performance Issues - Summary: Multiple LINQ operations degrade performance on large project collections. - Multiple LINQ operations on projects collection, Performance impact with large project counts

Maintainability Issues - Summary: Avoid magic strings to improve code clarity and maintainability. - Use of magic string for project name construction, Reduced code clarity and maintainability due to string concatenation

UX Impact Notes - Summary: Displays filtered and transformed project list to enhance merging experience. - Display filtered project list, Transform project data for display, Enhance project merging UX - Handle HTTP GET requests

Test Case Ideas - Summary: Verify HTTP GET handling, routing, view rendering, project filtering, and project name formatting. - Route to ProjectsController, Render correct view, Filter projects excluding current, Format project names with ID and hyphen

Dependencies & Called Services - Summary: Uses Enumerable for collection operations and IProjectModel for project data abstraction. - Enumerable for collection manipulation, IProjectModel for project data abstraction

MergeMultipleproject

Summary: The method validates input, creates a target project, merges multiple source projects, updates project mappings and elements, and saves the combined XML data.

JsonResult ProjectsController.MergeMultipleproject()

Routing

  • HTTP: POST
  • URL: /Projects/MergeMultipleproject

Cross-layer call chain - ProjectsController.MergeMultipleproject → Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars - ProjectsController.MergeMultipleproject → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars["Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    ProjectsController_MergeMultipleproject["ProjectsController.MergeMultipleproject"]
    ProjectsController_MergeMultipleproject --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProjectsController_MergeMultipleproject --> Andromeda_Core_Utility_Encrypt_DecryptString
Detailed Analysis

Key Flows - Summary: The method validates input - creates a target project - updates project mappings and elements - Initialize target project ID and validate source project ID presence - Decode JSON list of source project IDs and create target project from form data - Update swim lanes

Error Flows - Summary: Handle null inputs - Null reference risk from missing Request.Form or FromId, Invalid integer conversion of source project IDs, Merge operation failure indicated by project ID zero or error message, Discard child changes on failure status with failure JSON response, Decryption errors without explicit handling, Incomplete code causing compilation or runtime errors

Security Issues - Summary: Fix multiple injection and authorization vulnerabilities in project merging. - Unauthorized data modification by discarding child changes without checks

Performance Issues - Summary: Optimize multiple FirstOrDefault calls, AddRange operations, and DiscardChildChanges for better performance. - Multiple FirstOrDefault calls inside loops over large collections, Multiple AddRange calls combining large lists, DiscardChildChanges method causing database or computational overhead

Maintainability Issues - Summary: The method suffers from unclear code, magic values, and poor structure reducing maintainability. - Complex XML manipulation and mapping updates reduce clarity - Conditional logic should be extracted into separate methods

UX Impact Notes - Summary: Merge failures and incomplete responses disrupt user workflows and cause client errors. - Discard child changes and return failure responses on merge failure - Incomplete return statements cause unexpected client behavior

Test Case Ideas - Summary: Test project creation, merge operations, data retrieval, directory handling, and performance with large data. - Create new project with correct parameters - Create and verify existence of project folder directory - Handle valid HTTP POST requests with form data - Process merge results with valid, zero, and error project IDs - Retrieve mapping details, actors, and XML shapes accurately, Ensure performance and correctness with large mappings and project elements

Dependencies & Called Services - Summary: Uses data structures, XML processing, encryption, and actor/process models. - Data structures: List, Enumerable, Int32, String, XML processing: XContainer, XElement, Encryption utilities, Actor and process models: IActorModel, IProcessModel, Conversion utilities, LINQ extensions

MergeProject

Summary: MergeProject extracts data, validates status, updates and combines project elements, creates XML, saves files, and returns results.

JsonResult ProjectsController.MergeProject()

Routing

  • HTTP: POST
  • URL: /Projects/MergeProject

Cross-layer call chain - ProjectsController.MergeProject → Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars["Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars"]
    ProjectsController_MergeProject["ProjectsController.MergeProject"]
    ProjectsController_MergeProject --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
Detailed Analysis

Key Flows - validates status - updates and combines project elements - creates XML - and returns results. - Create XML elements and geometric info document for merged data - return JSON result - Update project elements by remapping IDs and replacing text with actor names - Validate project status for merge eligibility

Error Flows - Summary: Handle project status check failures and prevent NullReferenceExceptions in ID mapping. - Return failure JSON if project status check fails - Risk of unhandled conditions from incomplete project status validation

Security Issues - Summary: Direct user input conversion without validation risks SQL injection and data tampering. - Lack of input validation, SQL injection vulnerability, Data tampering risk

Performance Issues - Summary: Optimize data handling to prevent slow lookups and memory inefficiencies. - Use of ToList() on large datasets causing performance degradation

Maintainability Issues - Summary: Replace magic strings and numbers with constants, fix typos, and complete code for clarity and maintainability. - Replace magic strings with named constants or enums, Replace magic numbers with named constants, Fix variable naming typos and unclear names, Complete truncated code segments to avoid compilation errors

UX Impact Notes - Summary: The method returns JSON responses that provide clear user feedback on merge success or failure. - JSON responses indicate merge success or failure, Merge outcome directly affects user feedback

Test Case Ideas - Summary: Validate input - property updates - merging logic - ID property update from Index for all relevant objects - Shape ID updates with valid and missing mappings

Dependencies & Called Services - Summary: Uses core collections, LINQ, XML, and actor/process model interfaces. - Core collections: List, Enumerable, LINQ extensions, XML elements: XContainer, XElement, Actor and process interfaces: IActorModel, IProcessModel, Primitive types: Int32, String, Directory and Convert utilities

SavePathClusterRank

Summary: Retrieve valid integer selId from form, validate range, save configuration, and return JSON result.

JsonResult ProjectsController.SavePathClusterRank()

Routing

  • HTTP: POST
  • URL: /Projects/SavePathClusterRank
Detailed Analysis

Key Flows - validate range - and return JSON result. - Return JSON response indicating save result - Validate selId within specified range

Error Flows - Summary: Handle exceptions from empty form data and invalid selId values. - Exception from empty or non-integer form data, Incomplete handling of out-of-range selId values

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

Maintainability Issues - Summary: Replace magic numbers and strings with named constants and fix incomplete conditionals. - Use named constants instead of magic number 0 for Request.Form index, Replace magic strings 'PathCluster' and 'K-means' with named constants in SaveConfigurationDetails, Complete and correct truncated conditional statements

UX Impact Notes - Summary: The JSON response affects user flows but lacks detailed impact information. - JSON response affects user flows, Incomplete details on response content

Test Case Ideas - Summary: Verify SavePathClusterRank handles inputs correctly and returns valid JSON responses. - Valid integer form value handling, Empty form collection robustness, selId range validation for SaveConfigurationDetails call, Correct parameters passed to SaveConfigurationDetails, Valid JSON response generation, Proper handling of 'lId' variable in response

Dependencies & Called Services - Summary: Uses Convert and IProcessModel services for data transformation and processing. - Convert service, IProcessModel interface

GenarateMavenExcel

Summary: GenerateMavenExcel retrieves project data, populates an Excel template, and optionally exports a Visio file.

ActionResult ProjectsController.GenarateMavenExcel(int? ProjectId, int? onlyExcelExport, int? ReadOnlyExcel)

Routing

  • HTTP: GET
  • URL: /Projects/GenarateMavenExcel

Cross-layer call chain - ProjectsController.GenarateMavenExcel → Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars - ProjectsController.GenarateMavenExcel → Andromeda.Core.Entities.ProjectData.GetobjActivityRiskControls - ProjectsController.GenarateMavenExcel → Andromeda.Core.Entities.ProjectData.GetCompensatoryActivities - ProjectsController.GenarateMavenExcel → Andromeda.Core.Entities.ProjectData.GetObjectiveControlsMaster - ProjectsController.GenarateMavenExcel → Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData - ProjectsController.GenarateMavenExcel → Andromeda.Core.Extensions.LinqExtensions.getSkillScore - ProjectsController.GenarateMavenExcel → Andromeda.Core.Entities.ProjectData.GetOfficeList - ProjectsController.GenarateMavenExcel → Andromeda.Core.Entities.ProjectData.GetInfraMasterDetails - ProjectsController.GenarateMavenExcel → Andromeda.Core.Entities.ProjectData.GetInfraDetails - ProjectsController.GenarateMavenExcel → Andromeda.Core.Entities.ProjectData.GetOfficePremises - ProjectsController.GenarateMavenExcel → Andromeda.Core.Entities.ProjectData.GetConnectivityDetails - ProjectsController.GenarateMavenExcel → Andromeda.Core.Services.ExcelGenerator.UpdateCell - ProjectsController.GenarateMavenExcel → Insorce.Helpers.Helpers.CurrencyConverter - ProjectsController.GenarateMavenExcel → Andromeda.Core.Services.ExcelGenerator.CloneRow - ProjectsController.GenarateMavenExcel → Andromeda.Core.Entities.Actor.GetLocation - ProjectsController.GenarateMavenExcel → Andromeda.Core.Services.ExcelGenerator.getColumnName - ProjectsController.GenarateMavenExcel → Andromeda.Core.Entities.Activity.GetNVAType - ProjectsController.GenarateMavenExcel → Andromeda.Core.Services.VSDX.VSDXGenerate.ExportVSDX - ProjectsController.GenarateMavenExcel → Andromeda.Core.Utility.Compress.CreateZip - Andromeda.Core.Entities.ProjectData.GetCompensatoryActivities → Andromeda.Core.DataManager.GetDataList - Insorce.Helpers.Helpers.CurrencyConverter → Andromeda.Core.Extensions.LinqExtensions.CurrencyConverter - Andromeda.Core.Entities.Actor.GetLocation → Andromeda.Core.DataManager.GetData - Andromeda.Core.Services.VSDX.VSDXGenerate.ExportVSDX → Andromeda.Core.Utility.Compress.CreateZip

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetData["Andromeda.Core.DataManager.GetData"]
    Andromeda_Core_DataManager_GetDataList["Andromeda.Core.DataManager.GetDataList"]
    Andromeda_Core_Entities_Activity_GetNVAType["Andromeda.Core.Entities.Activity.GetNVAType"]
    Andromeda_Core_Entities_Actor_GetLocation["Andromeda.Core.Entities.Actor.GetLocation"]
    Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData["Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData"]
    Andromeda_Core_Entities_ProjectData_GetCompensatoryActivities["Andromeda.Core.Entities.ProjectData.GetCompensatoryActivities"]
    Andromeda_Core_Entities_ProjectData_GetConnectivityDetails["Andromeda.Core.Entities.ProjectData.GetConnectivityDetails"]
    Andromeda_Core_Entities_ProjectData_GetInfraDetails["Andromeda.Core.Entities.ProjectData.GetInfraDetails"]
    Andromeda_Core_Entities_ProjectData_GetInfraMasterDetails["Andromeda.Core.Entities.ProjectData.GetInfraMasterDetails"]
    Andromeda_Core_Entities_ProjectData_GetObjectiveControlsMaster["Andromeda.Core.Entities.ProjectData.GetObjectiveControlsMaster"]
    Andromeda_Core_Entities_ProjectData_GetOfficeList["Andromeda.Core.Entities.ProjectData.GetOfficeList"]
    Andromeda_Core_Entities_ProjectData_GetOfficePremises["Andromeda.Core.Entities.ProjectData.GetOfficePremises"]
    Andromeda_Core_Entities_ProjectData_GetobjActivityRiskControls["Andromeda.Core.Entities.ProjectData.GetobjActivityRiskControls"]
    Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter["Andromeda.Core.Extensions.LinqExtensions.CurrencyConverter"]
    Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars["Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars"]
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    Andromeda_Core_Services_ExcelGenerator_CloneRow["Andromeda.Core.Services.ExcelGenerator.CloneRow"]
    Andromeda_Core_Services_ExcelGenerator_UpdateCell["Andromeda.Core.Services.ExcelGenerator.UpdateCell"]
    Andromeda_Core_Services_ExcelGenerator_getColumnName["Andromeda.Core.Services.ExcelGenerator.getColumnName"]
    Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX["Andromeda.Core.Services.VSDX.VSDXGenerate.ExportVSDX"]
    Andromeda_Core_Utility_Compress_CreateZip["Andromeda.Core.Utility.Compress.CreateZip"]
    Insorce_Helpers_Helpers_CurrencyConverter["Insorce.Helpers.Helpers.CurrencyConverter"]
    ProjectsController_GenarateMavenExcel["ProjectsController.GenarateMavenExcel"]
    Andromeda_Core_Entities_Actor_GetLocation --> Andromeda_Core_DataManager_GetData
    Andromeda_Core_Entities_ProjectData_GetCompensatoryActivities --> Andromeda_Core_DataManager_GetDataList
    Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX --> Andromeda_Core_Utility_Compress_CreateZip
    Insorce_Helpers_Helpers_CurrencyConverter --> Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_Activity_GetNVAType
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_Actor_GetLocation
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetCompensatoryActivities
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetConnectivityDetails
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetInfraDetails
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetInfraMasterDetails
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetObjectiveControlsMaster
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetOfficeList
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetOfficePremises
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Entities_ProjectData_GetobjActivityRiskControls
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Services_ExcelGenerator_CloneRow
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Services_ExcelGenerator_UpdateCell
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Services_ExcelGenerator_getColumnName
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX
    ProjectsController_GenarateMavenExcel --> Andromeda_Core_Utility_Compress_CreateZip
    ProjectsController_GenarateMavenExcel --> Insorce_Helpers_Helpers_CurrencyConverter
Detailed Analysis

Key Flows - Summary: GenerateMavenExcel retrieves project data, populates an Excel template, and optionally exports a Visio file. - Return HttpNotFoundResult if project not found - Handle onlyExcelExport and ReadOnlyExcel parameters for export control

Error Flows - Summary: Handle null data and file operation errors to prevent exceptions and return appropriate responses. - Check for null references in model and project data - Handle exceptions during file copy operations - Handle exceptions during JSON deserialization of form data - Return HttpNotFoundResult if project details are null - Validate file paths before opening or saving Excel documents

Security Issues - Summary: Prevent directory and path traversal and secure JSON deserialization. - JSON deserialization vulnerability from unvalidated DataProperties input

Performance Issues - and Excel updates to improve performance. - Frequent ExcelGenerator.UpdateCell and worksheetPart.Worksheet.Save calls inside loops

Maintainability Issues - Summary: The method suffers from poor naming, hardcoded values, tight coupling, and code clutter. - Typo in method name 'GenarateMavenExcel', Use of magic strings and numbers for sheet names, columns, and constants, Non-descriptive variable names like 'r', 'val', 'br', 'obj', 'va', Tight coupling with ExcelGenerator, OpenXML, and project data models, Commented-out code and unused variables clutter codebase, Hardcoded passwords for sheet protection, Incomplete and fragmented code causing readability and compilation issues

UX Impact Notes - Summary: The method provides detailed Excel exports but errors or missing projects cause failures and delays. - HttpNotFoundResult on missing project, Delays and failures from file creation or data retrieval errors, Detailed project data in Excel enhances user insight, Optional parameters improve export flexibility, Delays and errors during Visio file generation impact UX

Test Case Ideas - Summary: Verify Excel generation handles data - Create temporary folder and copy Excel template - Ensure performance and correctness with large datasets - Handle optional parameters onlyExcelExport and ReadOnlyExcel - Update and remove rows and cells accurately

Dependencies & Called Services - Summary: GenerateMavenExcel uses data models, file handling, Excel OpenXML, and utility helpers. - Data models: Activity, Actor, IActorModel, IControlModel, IInfraModel, IProcessModel, IProjectModel, ProductFormBRMapping, ProjectData, Projects, File and directory handling: File, Directory, Path, Excel generation: ExcelGenerator, SpreadsheetDocument, OpenXmlCompositeElement, OpenXmlElement, OpenXmlPartContainer, OpenXmlPartRootElement, Data types and collections: DateTime, Decimal, Double, Int32, TimeSpan, String, List, Dictionary, Enumerable, Utilities and helpers: Compress, Convert, Helpers, HttpServerUtility, LinqExtensions, Math, XmlConvert, Additional generation: VSDXGenerate

GetBrSkill

Summary: GetBrSkill retrieves a skill score from input and returns a corresponding string based on that score.

string ProjectsController.GetBrSkill(int val)

Routing

  • URL: /Projects/GetBrSkill

Cross-layer call chain - ProjectsController.GetBrSkill → Andromeda.Core.Extensions.LinqExtensions.getSkillScore

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    ProjectsController_GetBrSkill["ProjectsController.GetBrSkill"]
    ProjectsController_GetBrSkill --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
Detailed Analysis

Key Flows - Summary: GetBrSkill retrieves a skill score from input and returns a corresponding string based on that score. - Return mapped string or default if no match

Error Flows - Summary: GetBrSkill method lacks exception handling and contains syntax errors causing failures. - Incomplete and malformed code fragments, Syntax errors causing compilation or runtime failures, No exception handling

Security Issues - Summary: Fix syntax errors to prevent unexpected behavior and security vulnerabilities. - Syntax errors causing unexpected behavior, Incomplete code leading to vulnerabilities

Maintainability Issues - Summary: The method is unclear, incomplete, and uses hardcoded magic strings, harming maintainability. - Unclear private method purpose, Incomplete switch statement causing errors, Malformed and incomplete code fragments, Hardcoded magic strings with unclear meaning

UX Impact Notes - Summary: Hardcoded strings may confuse users about application state or skill categories. - Hardcoded string values displayed to users, Potential user confusion on application state, Potential user confusion on skill categorization

Test Case Ideas - Summary: Verify GetBrSkill returns correct strings for all integer inputs and compiles without errors. - Handle incomplete or malformed code gracefully - Return string validation for integer inputs - Return '1 - F' under specified conditions - Validate getSkillScore returns expected values

Dependencies & Called Services - Summary: Uses LinqExtensions for data querying and manipulation. - LinqExtensions for data querying

getActType

Summary: Determine activity type by evaluating ActivityData properties and specific type conditions.

string ProjectsController.getActType(ActivityData act)

Routing

  • URL: /Projects/getActType
Detailed Analysis

Key Flows - Summary: Determine activity type by evaluating ActivityData properties and specific type conditions. - Return ActivityData.Typ as string - Assign actType if type is 'Activity' - Set actType based on eCase condition

Error Flows - Summary: The method lacks explicit error handling and risks null reference exceptions. - Absence of explicit error handling, Potential null reference exceptions from null ActivityData or its properties

Maintainability Issues - Summary: Improve naming, replace magic strings with constants, and complete code for maintainability. - Non-PascalCase method name, Use of magic strings instead of constants, Incomplete or truncated code sections

Test Case Ideas - Summary: Verify getActType returns correct values for varied act.Type inputs and eCase conditions. - Conditional logic with act.Type values 'Start/End' - actType assignment when eCase condition is true and false - Return expected string values for diverse inputs

Dependencies & Called Services - Summary: Uses String class for return type in getActType method. - String return type

RenewelToken

Summary: RenewalToken conditionally calls method 't' if the current project's license matches RootID.

JsonResult ProjectsController.RenewelToken()

Routing

  • HTTP: POST
  • URL: /Projects/RenewelToken

Cross-layer call chain - ProjectsController.RenewelToken → Andromeda.Core.Utility.Encrypt.DecryptString - ProjectsController.RenewelToken → Andromeda.Core.Services.Registry.setProjectDetails - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    ProjectsController_RenewelToken["ProjectsController.RenewelToken"]
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProjectsController_RenewelToken --> Andromeda_Core_Services_Registry_setProjectDetails
    ProjectsController_RenewelToken --> Andromeda_Core_Utility_Encrypt_DecryptString
Detailed Analysis

Key Flows - Summary: RenewalToken conditionally calls method 't' if the current project's license matches RootID. - Conditional call to method 't' on license match with RootID

Error Flows - Summary: Handle token validation failure and missing error handling for decryption and null references. - Return JSON response on token validation failure

Security Issues - Summary: RenewelToken lacks input validation and error handling, risking exceptions and security breaches. - Missing input validation for RootID and NewToken, No error handling for DecryptString method, Potential exposure to injection and token tampering attacks

Performance Issues - Summary: GetProjectDetails lacks caching, degrading performance on frequent calls. - GetProjectDetails method without caching or optimization, Potential performance degradation on frequent calls

Maintainability Issues - Summary: The method uses magic strings, has tight namespace coupling, and contains incomplete code. - Use of magic strings reduces clarity and increases error risk, Tight coupling with specific namespaces limits flexibility, Incomplete code with partial conditionals and missing session item names

UX Impact Notes - Summary: Provide clear feedback on missing tokens and manage session removal impact. - Client must handle JSON responses from token validation

Test Case Ideas - Summary: Verify RenewelToken returns correct JsonResult - handles POST - validates responses - and updates registry. - Handle HTTP POST requests - Return JsonResult - Return JSON based on 'msg' validation - Retrieve and set project details in registry

Dependencies & Called Services - Summary: Uses data conversion, encryption, and model interfaces for token renewal. - Data conversion, Encryption, Project model interface, Registry access, String manipulation - Process model interface

CheckProjectLevelPermission

Summary: CheckProjectLevelPermission verifies if a user has the required permissions at the project level before allowing access or actions.

JsonResult ProjectsController.CheckProjectLevelPermission(int? RootID)

Routing

  • HTTP: GET
  • URL: /Projects/CheckProjectLevelPermission
Detailed Analysis

Key Flows - Summary: CheckProjectLevelPermission verifies if a user has the required permissions at the project level before allowing access or actions. - Authorize access based on project roles, Deny access if permissions are insufficient - Validate user project-level permissions

Error Flows - Summary: Return JSON error if RootID is invalid or user role is not found. - Invalid RootID handling, User role not found error response

Security Issues - Summary: Prevent information disclosure by sanitizing user permissions before processing or returning. - Information disclosure risk, Unsanitized user permissions

Performance Issues - Summary: No performance issues identified in CheckProjectLevelPermission method.

Maintainability Issues - Summary: Unclear variable names and incomplete method names reduce code readability and maintainability. - Unclear variable names like 'ue' and 'RootID.Va', Use of magic strings or enums without context, Incomplete method name 'JsonRequestBehav' indicating naming issues

UX Impact Notes - Summary: The JSON response directly controls user access flow based on permission checks. - JSON response informs UI of permission status, User access flow depends on permission result

Test Case Ideas - Summary: Test project-level permission checks for correct access control. - Validate error handling on permission failures - Verify permission grants for valid users, Confirm denial for unauthorized users, Test boundary cases for permission levels

Dependencies & Called Services - Summary: Uses collections, process model interface, and string operations. - Enumerable collections, IProcessModel interface, String operations

ClearSession

Summary: ClearSession removes the 'ExpiryDays' session variable via HTTP POST and returns success as JSON.

JsonResult ProjectsController.ClearSession()

Routing

  • HTTP: POST
  • URL: /Projects/ClearSession
Detailed Analysis

Key Flows - Summary: ClearSession removes the 'ExpiryDays' session variable via HTTP POST and returns success as JSON. - Return success JsonResult

Maintainability Issues - Summary: Rename ClearSession to reflect it removes a specific session variable only. - Misleading method name ClearSession, Method removes only one session variable, not entire session

UX Impact Notes - Summary: ClearSession returns JsonResult that triggers redirects or success messages. - JsonResult triggers user redirect

Test Case Ideas - and returns success JsonResult. - Return success JsonResult from ClearSession

UpdateProjectDetailes

Summary: Update project freeze status and details based on request, then return update confirmation.

JsonResult ProjectsController.UpdateProjectDetailes()

Routing

  • HTTP: POST
  • URL: /Projects/UpdateProjectDetailes

Cross-layer call chain - ProjectsController.UpdateProjectDetailes → Andromeda.Core.Services.Registry.UpdatePermissions - ProjectsController.UpdateProjectDetailes → Andromeda.Core.Services.Registry.setProjectDetails - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_Registry_UpdatePermissions["Andromeda.Core.Services.Registry.UpdatePermissions"]
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    ProjectsController_UpdateProjectDetailes["ProjectsController.UpdateProjectDetailes"]
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProjectsController_UpdateProjectDetailes --> Andromeda_Core_Services_Registry_UpdatePermissions
    ProjectsController_UpdateProjectDetailes --> Andromeda_Core_Services_Registry_setProjectDetails
Detailed Analysis

Key Flows - Summary: Update project freeze status and details based on request - then return update confirmation. - Update project freeze status using project ID and request data - Retrieve and store updated project details in registry - Return JSON result confirming update completion

Error Flows - Summary: Handle form data conversion errors and validate project freeze status to prevent runtime exceptions. - Complete conditional checks for project freeze status to avoid null references - Handle missing or invalid form data keys like 'update' - 'updatePId' - Validate and safely convert form data to integers and booleans

Security Issues - Summary: Unvalidated Request.Form data risks SQL injection - Potential data tampering from unvalidated input in update operations

Performance Issues - Summary: Uncached calls to Registry.setProjectDetails and model.GetProjectDetails degrade performance. - Uncached Registry.setProjectDetails calls

Maintainability Issues - Summary: Fix method name typo and replace magic strings and casts for clarity and maintainability. - Typo in method name 'UpdateProjectDetailes' causes confusion

UX Impact Notes - Summary: Handle errors clearly and indicate success or failure in JSON responses to improve UX. - Handle errors from invalid form data conversions - Indicate success or failure in JSON responses

Test Case Ideas - Summary: Verify JsonResult return - and project ID matching logic. - Handle HTTP POST requests - Return JsonResult - Match current project ID with update form value

Dependencies & Called Services - Summary: Uses project model and registry for project detail updates. - IProjectModel interface, Registry service, Char conversion utility

DeleteProjectTemp

Summary: DeleteProjectTemp retrieves and validates ProjectId, updates registry if matched, and returns a JsonResult.

JsonResult ProjectsController.DeleteProjectTemp(int ProjectId)

Routing

  • HTTP: POST
  • URL: /Projects/DeleteProjectTemp

Cross-layer call chain - ProjectsController.DeleteProjectTemp → Andromeda.Core.Services.Registry.CheckPermissions - ProjectsController.DeleteProjectTemp → Andromeda.Core.Services.Registry.setProjectDetails - Andromeda.Core.Services.Registry.CheckPermissions → Andromeda.Core.LoggingManager.Info - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    Andromeda_Core_Services_Registry_CheckPermissions["Andromeda.Core.Services.Registry.CheckPermissions"]
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    ProjectsController_DeleteProjectTemp["ProjectsController.DeleteProjectTemp"]
    Andromeda_Core_Services_Registry_CheckPermissions --> Andromeda_Core_LoggingManager_Info
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProjectsController_DeleteProjectTemp --> Andromeda_Core_Services_Registry_CheckPermissions
    ProjectsController_DeleteProjectTemp --> Andromeda_Core_Services_Registry_setProjectDetails
Detailed Analysis

Key Flows - Summary: DeleteProjectTemp retrieves and validates ProjectId - updates registry if matched - and returns a JsonResult. - Fetch project details by ProjectId - Compare and update registry project if IDs match - Return JsonResult to caller

Error Flows - Summary: Validate ProjectId and permissions before deleting the project to prevent errors and unauthorized actions. - Failed permission check halts project deletion - Mismatched project IDs prevent project detail updates

Security Issues - Summary: DeleteProjectTemp risks SQL injection and authorization bypass without proper validation and permission checks. - Authorization bypass risk from improper CheckPermissions enforcement

Maintainability Issues - and has unclear logic. - Implicit return without clear return value

UX Impact Notes - Summary: Users face unclear denial and confusion if project ID mismatches block deletion. - Unclear feedback on permission denial, Confusing failure due to project ID mismatch

Test Case Ideas - data update - and return type. - Project details retrieval and update - JsonResult return type verification

Dependencies & Called Services - Summary: DeleteProjectTemp uses Convert, IProjectModel, and Registry services. - Convert service, IProjectModel interface, Registry service

SaveCommentText

Summary: Extract comment data from POST request and persist it using SaveOrUpdateSaveCommentText.

JsonResult ProjectsController.SaveCommentText()

Routing

  • HTTP: POST
  • URL: /Projects/SaveCommentText

Cross-layer call chain - ProjectsController.SaveCommentText → Andromeda.Core.Entities.Membership.GetAllUsers - ProjectsController.SaveCommentText → Insorce.Models.UserProfile.GetUserProfile - ProjectsController.SaveCommentText → Insorce.Models.UsersModel.FromMembershipUser

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Insorce_Models_UserProfile_GetUserProfile["Insorce.Models.UserProfile.GetUserProfile"]
    Insorce_Models_UsersModel_FromMembershipUser["Insorce.Models.UsersModel.FromMembershipUser"]
    ProjectsController_SaveCommentText["ProjectsController.SaveCommentText"]
    ProjectsController_SaveCommentText --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProjectsController_SaveCommentText --> Insorce_Models_UserProfile_GetUserProfile
    ProjectsController_SaveCommentText --> Insorce_Models_UsersModel_FromMembershipUser
Detailed Analysis

Key Flows - Summary: Extract comment data from POST request and persist it using SaveOrUpdateSaveCommentText. - Persist comment via SaveOrUpdateSaveCommentText

Error Flows - Summary: Handle exceptions and validate input to prevent silent failures and runtime errors. - Unlogged exceptions during email sending causing silent failures

Security Issues - Summary: SaveCommentText risks SQL injection, unauthorized data access, and email injection. - SQL injection from unvalidated form data conversion

Performance Issues - Summary: Avoid ToList() and Any() on large data sets to prevent performance bottlenecks. - Use of ToList() on large data sets - Use of Any() on large data sets

Maintainability Issues - Summary: Replace magic strings with constants to improve code clarity and ease modifications. - Use constants instead of magic strings for request form keys, Avoid hardcoded email body construction with magic strings

UX Impact Notes - Summary: Email notifications improve awareness but silent failures and delays harm user experience. - Silent failures from empty catch blocks cause lack of error feedback

Test Case Ideas - and collection updates. - Add umodel objects to dispList collection - Check IsC condition triggers email sending - Handle empty or malformed email recipient lists - Process and lowercase email addresses - Validate SaveCommentText parameters from request form

Dependencies & Called Services - Summary: Uses collections, enumeration, project and process models, membership, and SMTP client services. - Collection handling, Enumeration utilities, Project model interface, List data structure, Membership management, Project management, SMTP client for email - Process model interface

GetNodeName

Summary: GetNodeName returns a node name string based on the input id using a switch statement.

string ProjectsController.GetNodeName(string id)

Routing

  • URL: /Projects/GetNodeName
Detailed Analysis

Key Flows - Summary: GetNodeName returns a node name string based on the input id using a switch statement. - Return node name string directly

Error Flows - Summary: GetNodeName has incomplete switch cases causing errors and lacks exception handling. - Incomplete default case leading to undefined behavior or missing return

Security Issues - Summary: Incomplete code risks unexpected behavior exploitable by attackers. - Incomplete code risks unexpected behavior, Potential exploitation due to incomplete implementation

Maintainability Issues - and truncated returns reduce maintainability and cause bugs. - Use of magic strings for case and return values - Truncated and misspelled returned strings indicating bugs

UX Impact Notes - Summary: Returns hardcoded strings that may confuse users if truncated or unrecognized. - Hardcoded strings risk user confusion if truncated or misspelled, Incomplete default case causes lack of feedback for unrecognized inputs

Test Case Ideas - Summary: Verify GetNodeName returns correct strings for known IDs and handles unknown IDs safely. - Handle unrecognized ID values with default case - Return expected string for recognized ID values

GetHelpImages

Summary: GetHelpImages processes a POST request with a HelpTopic, parses HelpGallery.xml for matching media, and returns help images as JSON.

JsonResult ProjectsController.GetHelpImages()

Routing

  • HTTP: POST
  • URL: /Projects/GetHelpImages
Detailed Analysis

Key Flows - and returns help images as JSON. - Load HelpGallery.xml from server content directory - Return help images collection as JSON response

Error Flows - Summary: The method lacks validation and error handling for invalid input and XML processing failures. - Returns empty result for invalid or unmatched 'HelpTopic' without error

Security Issues - Summary: Sanitize 'HelpTopic' parameter to prevent XML injection. - Unsanitized 'HelpTopic' parameter, XML injection vulnerability

Performance Issues - Summary: No performance issues identified in GetHelpImages method.

Maintainability Issues - Summary: No maintainability issues identified in GetHelpImages method.

UX Impact Notes - Summary: Ensure valid 'HelpTopic' parameter to avoid confusing or empty results. - Missing or invalid 'HelpTopic' causes empty or incorrect results, Empty or incorrect results confuse users

Test Case Ideas - Summary: Verify GetHelpImages handles POST requests and returns correct images for valid HelpTopic. - Handle HTTP POST requests - Return correct images for valid HelpTopic parameter

Dependencies & Called Services - Summary: Uses XML processing, HTTP utilities, and stream reading extensions. - XML processing with XContainer and XElement, HTTP utilities via HttpServerUtility, Stream reading with StreamReader and TextReader, Enumerable and Extensions for collection operations

DataExtract

Summary: Handles HTTP GET requests by fetching, processing, sorting project data, storing it in ViewData, and returning the View.

ActionResult ProjectsController.DataExtract()

Routing

  • HTTP: GET
  • URL: /Projects/DataExtract
View Metadata
  • View: DataExtract (Andromeda.Web\Views\Projects\DataExtract.cshtml)
Detailed Analysis

Key Flows - Summary: Handles HTTP GET requests by fetching - and returning the View. - Fetch all project data - Process and sort project data - Return corresponding View

Performance Issues - Summary: Loading all project data into memory with ToList() degrades performance. - Performance degradation from loading large data sets

Maintainability Issues - Summary: Anonymous types reduce code readability and maintainability. - Use of anonymous types for data transformation, Reduced code readability, Decreased maintainability

UX Impact Notes - Summary: ViewData content directly controls the rendered view output. - ViewData dictionary content, Rendered view output

Test Case Ideas - Summary: Verify DataExtract handles GET requests - and returns the expected View. - Handle HTTP GET request correctly - Return the expected View

Dependencies & Called Services - Summary: Uses Enumerable for data operations and IProjectModel for project data abstraction. - Enumerable for data manipulation, IProjectModel for project data abstraction

ExtractData

Summary: Extract project activities and controls, filter related data, and return as UTF-8 CSV file.

FileContentResult ProjectsController.ExtractData(string PIds)

Routing

  • HTTP: GET
  • URL: /Projects/ExtractData

Cross-layer call chain - ProjectsController.ExtractData → Andromeda.Core.Extensions.LinqExtensions.getSkillScore

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    ProjectsController_ExtractData["ProjectsController.ExtractData"]
    ProjectsController_ExtractData --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
Detailed Analysis

Key Flows - and return as UTF-8 CSV file. - Convert CSV string to UTF-8 bytes and return as downloadable file

Security Issues - Summary: Prevent SQL injection and ensure consistent UTF-8 encoding with BOM. - SQL injection risk from unsanitized row values, Encoding inconsistency due to UTF8Encoding without BOM

Performance Issues - Summary: Optimize data iteration, LINQ usage, and string operations to improve performance. - Inefficient full DataTable iteration on large datasets

Maintainability Issues - Summary: Replace magic strings and simplify LINQ calls to improve code clarity and maintainability. - Use of magic strings in headers and property names reduces readability, Undefined variable 'dt' obscures data source, Hardcoded filter values complicate maintenance, Sequential Any and First calls increase iterations; use FirstOrDefault instead, Magic string for data conversion should be a named constant

UX Impact Notes - Summary: Provides downloadable CSV file with extracted project data. - Downloadable CSV file, Extracted project data

Test Case Ideas - filtering logic - Return UTF-8 encoded file with expected data - Handle empty DataTable gracefully - Validate conditional logic for 'f.Id' versus 'actId'

Dependencies & Called Services - Summary: ExtractData uses data conversion, encoding, collections, and domain models. - Data conversion utilities, Text encoding functions, Enumerable collections, Project domain model interface, Risk domain model interface, LINQ extension methods, Base object operations, String manipulation

UpdateIsSeenColumn

Summary: UpdateIsSeenColumn updates the 'IsSeen' status for each project item by ID and returns a JsonResult.

JsonResult ProjectsController.UpdateIsSeenColumn()

Routing

  • HTTP: POST
  • URL: /Projects/UpdateIsSeenColumn

Cross-layer call chain - ProjectsController.UpdateIsSeenColumn → Andromeda.Core.DataManager.Execute - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    ProjectsController_UpdateIsSeenColumn["ProjectsController.UpdateIsSeenColumn"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProjectsController_UpdateIsSeenColumn --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - Summary: UpdateIsSeenColumn updates the 'IsSeen' status for each project item by ID and returns a JsonResult. - Return JsonResult after processing - Update 'IsSeen' column for each project item via IProjectModel

Performance Issues - Summary: Loop-based updates on large ID collections degrade performance and risk errors. - Inefficient loop updates cause excessive database operations on large ID collections

Maintainability Issues - Summary: No maintainability issues identified in UpdateIsSeenColumn method.

UX Impact Notes - Summary: Returning JsonResult after updating 'IsSeen' improves user feedback and client updates. - Enable client-side updates

Test Case Ideas - Summary: Verify correct updates to 'IsSeen' column and JsonResult return for various ID collections. - Accurate update of 'IsSeen' column per item - Expected JsonResult return after updates

Dependencies & Called Services - Summary: UpdateIsSeenColumn depends on IProjectModel for project data access. - IProjectModel dependency for project data access

CommentsandNotifications

Summary: No key flows are defined for CommentsandNotifications.

ActionResult ProjectsController.CommentsandNotifications()

Routing

  • HTTP: GET
  • URL: /Projects/CommentsandNotifications
View Metadata
  • View: CommentsandNotifications (Andromeda.Web\Views\Projects\CommentsandNotifications.cshtml)
  • Model: IList<CommentsText>
Detailed Analysis

Key Flows - Summary: No key flows are defined for CommentsandNotifications.

Security Issues - Summary: Prevent SQL injection by sanitizing user ID before database queries. - Sanitize Registry.LoggedInUser.Id before model.GetCommentsTextByProject call

Performance Issues - Summary: No performance issues identified in CommentsandNotifications method.

Maintainability Issues - Summary: Rename variables to follow C# naming conventions for better readability and maintainability. - Non-standard variable naming reduces code readability and maintainability

UX Impact Notes - Summary: Improper rendering or formatting degrades user experience. - View rendering quality, Comment data formatting

Test Case Ideas - Summary: Verify method handles GET requests and returns correctly sorted project comments. - Handle HTTP GET requests - Return comments for given project ID

Dependencies & Called Services - Summary: Uses conversion and enumeration utilities with project model and string types. - Conversion utilities, Enumeration utilities, Project model interface, String type

DeleteCommentorNotification

Summary: The method deletes a commentor notification by Id and returns the deletion status as JSON.

JsonResult ProjectsController.DeleteCommentorNotification(int Id)

Routing

  • HTTP: POST
  • URL: /Projects/DeleteCommentorNotification

Cross-layer call chain - ProjectsController.DeleteCommentorNotification → Andromeda.Core.DataManager.Execute - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    ProjectsController_DeleteCommentorNotification["ProjectsController.DeleteCommentorNotification"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProjectsController_DeleteCommentorNotification --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - Summary: The method deletes a commentor notification by Id and returns the deletion status as JSON. - Return JsonResult with deletion success status

Maintainability Issues - Summary: Rename method to follow C# naming conventions and improve clarity. - Incorrect method name spelling, Non-standard C# naming convention

UX Impact Notes - Summary: Returns JsonResult to indicate deletion success and guide client response. - Client uses result to update UI

Test Case Ideas - Summary: Verify DeleteCommentorNotification accepts only POST and calls model method with correct Id. - Restrict DeleteCommentorNotification to HTTP POST requests, Call DeleteCommentorNotification on model with correct Id parameter

Dependencies & Called Services - Summary: DeleteCommentorNotification depends on IProjectModel for project data access. - IProjectModel dependency for project data access

SaveTemplateForProject

Summary: The method verifies the template flag, saves the template data for the project, and returns a JSON response.

JsonResult ProjectsController.SaveTemplateForProject()

Routing

  • URL: /Projects/SaveTemplateForProject

Cross-layer call chain - ProjectsController.SaveTemplateForProject → Andromeda.Core.DataManager.Execute - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    ProjectsController_SaveTemplateForProject["ProjectsController.SaveTemplateForProject"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProjectsController_SaveTemplateForProject --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - and returns a JSON response. - Check 'IsTemplate' field in request - Return JSON response indicating save outcome

Error Flows - Summary: Handle null and invalid inputs to prevent save failures and exceptions. - Check for null 'IsTemplate' before saving - Guard against null Request or Form objects to prevent null reference exceptions - Validate JSON in 'IsTemplate' to avoid deserialization errors

Security Issues - Summary: Direct JSON deserialization from request form risks injection attacks. - Unvalidated JSON deserialization

Maintainability Issues - Summary: Fix variable name typo and complete return statement for clarity and maintainability. - Incomplete return statement hinders code assessment

UX Impact Notes - Summary: Returns JSON response to provide dynamic success or error feedback. - JSON response for AJAX/API usage, Dynamic success and error messages

Test Case Ideas - Summary: Verify SaveTemplateForProject returns correct JsonResult and handles success and errors properly. - Handle errors correctly when saving template - Return valid JsonResult - Return expected Json response on success

Dependencies & Called Services - Summary: Uses IProjectModel to save templates for projects. - IProjectModel dependency

SaveBenchmarkForProject

Summary: Decode 'IsBenchmark' JSON from request and save benchmark data for the project, then return JSON response.

JsonResult ProjectsController.SaveBenchmarkForProject()

Routing

  • URL: /Projects/SaveBenchmarkForProject

Cross-layer call chain - ProjectsController.SaveBenchmarkForProject → Andromeda.Core.DataManager.Execute - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    ProjectsController_SaveBenchmarkForProject["ProjectsController.SaveBenchmarkForProject"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProjectsController_SaveBenchmarkForProject --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - then return JSON response. - Return JSON response after saving benchmark

Error Flows - Summary: Handle missing or invalid 'IsBenchmark' by skipping save and returning JSON response. - Skip save if 'IsBenchmark' is null, JSON decoding errors from invalid or missing 'IsBenchmark'

Security Issues - Summary: Direct JSON deserialization from request form risks injection attacks. - Direct JSON deserialization from request form, Lack of explicit JSON validation

Maintainability Issues - Summary: Unclear variable name reduces code clarity. - Unclear variable name 'IsBenchmark'

UX Impact Notes - Summary: The method provides JSON feedback to inform users of save success or errors. - JSON response with success feedback, JSON response with error feedback

Test Case Ideas - Summary: Verify SaveBenchmarkForProject returns correct JsonResult with expected data and calls model method properly. - Return JsonResult

Dependencies & Called Services - Summary: Uses IProjectModel to save benchmark data for a project. - IProjectModel dependency for project data access

ModelValidation

Summary: ModelValidation handles HTTP GET requests with an optional parameter and sets view data for rendering.

ActionResult ProjectsController.ModelValidation(int? isOptimize)

Routing

  • HTTP: GET
  • URL: /Projects/ModelValidation
Detailed Analysis

Key Flows - Summary: ModelValidation handles HTTP GET requests with an optional parameter and sets view data for rendering. - Handle HTTP GET request with optional integer parameter isOptimize - Set ViewData['page'] to 'ModelValidatio' - Return ActionResult rendering view using ViewData['page']

Error Flows - Summary: The method lacks explicit error handling and exception management. - Absence of error handling, No exception management

Maintainability Issues - Summary: The method is empty and its name does not clearly describe its function. - Empty method implementation, Unclear method name

UX Impact Notes - Summary: Setting 'page' key to 'ModelValidatio' affects view rendering and validation UI. - 'page' key in ViewData set to 'ModelValidatio'

Test Case Ideas - Summary: Verify ModelValidation action sets ViewData page and returns correct ActionResult. - Set ViewData 'page' key to 'ModelValidatio' on ModelValidation action - Return expected ActionResult from ModelValidation action

DecisionTree

Summary: Fetch project data, comments, and activities; check rework volume and iteration status.

ActionResult ProjectsController.DecisionTree()

Routing

  • HTTP: GET
  • URL: /Projects/DecisionTree

Cross-layer call chain - ProjectsController.DecisionTree → Andromeda.Core.Services.ProcessExtensions.FindByID - ProjectsController.DecisionTree → Andromeda.Core.Services.Algorithms.Delooper.deloop - ProjectsController.DecisionTree → 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"]
    ProjectsController_DecisionTree["ProjectsController.DecisionTree"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProjectsController_DecisionTree --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProjectsController_DecisionTree --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProjectsController_DecisionTree --> Andromeda_Core_Services_ProcessExtensions_FindByID
View Metadata
  • View: DecisionTree (Andromeda.Web\Views\Projects\DecisionTree.cshtml)
Detailed Analysis

Key Flows - and activities; check rework volume and iteration status. - Check if all activities are in a specific iteration - Fetch project comparison data and comments - Retrieve current project ID, Retrieve all activities for current project, Evaluate rework volume greater than zero

Error Flows - Summary: Handle incomplete conditions and JSON decoding failures to prevent undefined behavior. - Incomplete conditional checks causing unclear behavior

Performance Issues - Summary: Slow or resource-heavy data retrieval and inefficient loops degrade performance. - FindByID method used inside loops causing slowdowns on large datasets - getActivities method retrieving large activity sets impacting performance

Maintainability Issues - Summary: Incomplete code, unclear calls, inconsistent naming, and magic strings reduce maintainability. - Incomplete code and unclear method calls reduce clarity, Variable names like 'AllActivities' violate C# naming conventions, Magic strings in configuration retrieval complicate maintenance

UX Impact Notes - Summary: Populating ViewData with project details enhances project information display and visualization. - Assign project comparison data and comments to ViewData

Test Case Ideas - ViewData assignment - conditional logic - Assign ViewData values for project comparison and comments correctly - Return correct activities and populate AllActivities for project ID - Confirm CheckIsBaseProject returns expected results and updates ViewData - Validate conditional logic with different ReworkVolume and activity states

Dependencies & Called Services - Summary: Uses collections and interfaces for actor, control, process, and project models. - Enumerable collection, IActorModel interface, IControlModel interface, IProcessModel interface, IProjectModel interface, List collection - ProcessExtensions utilities

CustomizedTable

Summary: Handles HTTP GET requests by setting the page context and returning a redirect view.

ActionResult ProjectsController.CustomizedTable()

Routing

  • HTTP: GET
  • URL: /Projects/CustomizedTable
Detailed Analysis

Key Flows - Summary: Handles HTTP GET requests by setting the page context and returning a redirect view. - Set ViewData['page'] to 'CustomizedTable' - Return 'RedirectView' view

Maintainability Issues - Summary: Method name mismatches returned view name - Method name 'CustomizedTable' mismatches returned view 'RedirectView'

UX Impact Notes - Summary: Redirect users to 'RedirectView' page when accessing CustomizedTable. - User redirection to 'RedirectView' page

Test Case Ideas - Summary: Verify CustomizedTable handles GET requests - sets ViewData - and returns correct view. - Handle HTTP GET requests - Set ViewData key 'page' to 'CustomizedTable' - Return view named 'RedirectView'

CustomizedAnalytics

Summary: Handles HTTP GET requests by setting page data and returning a redirect view.

ActionResult ProjectsController.CustomizedAnalytics()

Routing

  • HTTP: GET
  • URL: /Projects/CustomizedAnalytics
Detailed Analysis

Key Flows - Summary: Handles HTTP GET requests by setting page data and returning a redirect view. - Set ViewData['page'] to 'CustomizedAnalytics' - Return 'RedirectView' view

Maintainability Issues - Summary: Method name mismatches returned view name - Method name 'CustomizedAnalytics' mismatches returned view 'RedirectView'

UX Impact Notes - Summary: Redirects user to the 'RedirectView' page. - User redirection to 'RedirectView' page

Test Case Ideas - Summary: Verify CustomizedAnalytics handles GET requests - sets ViewData - and returns correct view. - Handle HTTP GET requests - Set ViewData with key 'page' and value 'CustomizedAnalytics' - Return view named 'RedirectView'

TechnologyAnalytics

Summary: TechnologyAnalytics handles an HTTP GET request and sets the page identifier in ViewData.

ActionResult ProjectsController.TechnologyAnalytics()

Routing

  • HTTP: GET
  • URL: /Projects/TechnologyAnalytics
Detailed Analysis

Key Flows - Summary: TechnologyAnalytics handles an HTTP GET request and sets the page identifier in ViewData. - Handle HTTP GET request - Set ViewData key 'page' to 'TechnologyAnalytics'

Maintainability Issues - Summary: Method name mismatches returned view name - Method name 'TechnologyAnalytics' mismatches returned view 'RedirectView'

UX Impact Notes - Summary: Restricting to GET limits user actions and triggers redirection to a specific page. - User redirection to RedirectView page

Test Case Ideas - ViewData setting - and correct view return. - Handle HTTP GET requests correctly - Return error for non-GET HTTP requests - Set ViewData with key 'page' and value 'TechnologyAnalytics' - Return 'RedirectView' view

TeamAnalytics

Summary: Process HTTP GET request by setting view data and returning the redirect view.

ActionResult ProjectsController.TeamAnalytics()

Routing

  • HTTP: GET
  • URL: /Projects/TeamAnalytics
Detailed Analysis

Key Flows - Summary: Process HTTP GET request by setting view data and returning the redirect view. - Handle HTTP GET request - Set ViewData 'page' to 'TeamAnalytics' - Return 'RedirectView' view

Maintainability Issues - Summary: Method name mismatches returned view name - Method name 'TeamAnalytics' mismatches returned view 'RedirectView'

UX Impact Notes - Summary: Restricting to GET requests limits user actions and redirect behavior affects navigation flow. - HTTP GET attribute restricts method to GET requests only - RedirectView return influences user navigation flow

Test Case Ideas - Summary: Verify TeamAnalytics handles GET requests - sets ViewData - and returns correct view. - Handle HTTP GET requests correctly - Return error for non-GET requests - Set ViewData with key 'page' and value 'TeamAnalytics' - Return view named 'RedirectView'

EditPropMap

Summary: EditPropMap manages property mappings by editing and updating key-value pairs.

ActionResult ProjectsController.EditPropMap(string screen)

Routing

  • HTTP: GET
  • URL: /Projects/EditPropMap
Detailed Analysis

Key Flows - Summary: EditPropMap manages property mappings by editing and updating key-value pairs. - Edit property mappings - Update key-value pairs

Maintainability Issues - Summary: Correct the incomplete view name to prevent runtime errors and maintenance confusion. - Incomplete view name 'RedirectVie'

UX Impact Notes - Summary: The method handles only GET requests and returns a view that affects user navigation. - Returned view affects user experience

Test Case Ideas - Summary: Verify HTTP GET handling and correct ViewData 'page' value. - Handle HTTP GET requests correctly - Set ViewData 'page' to 'EditProcessMap'

ControlRedundancy

Summary: Handles HTTP GET requests by setting the page context and returning the redirect view.

ActionResult ProjectsController.ControlRedundancy()

Routing

  • HTTP: GET
  • URL: /Projects/ControlRedundancy
Detailed Analysis

Key Flows - Summary: Handles HTTP GET requests by setting the page context and returning the redirect view. - Set ViewData["page"] to "ControlRedundancy" - Return 'RedirectView' view

Maintainability Issues - Summary: Rename method to reflect its action for improved code clarity. - Method name misaligned with returned view

UX Impact Notes - Summary: Redirects user to 'RedirectView' showing current page as 'ControlRedundancy'. - User redirection to 'RedirectView'

Test Case Ideas - Summary: Verify ControlRedundancy handles GET requests - sets ViewData - and returns correct view. - Handle HTTP GET request - Set ViewData key 'page' to 'ControlRedundancy' - Return view named 'RedirectView'

CustomerControlRedundancy

Summary: Handles HTTP GET requests by setting the page identifier and returning the redirect view.

ActionResult ProjectsController.CustomerControlRedundancy()

Routing

  • HTTP: GET
  • URL: /Projects/CustomerControlRedundancy
Detailed Analysis

Key Flows - Summary: Handles HTTP GET requests by setting the page identifier and returning the redirect view. - Set ViewData page to CustomerControlRedundancy - Return RedirectView view

Maintainability Issues - Summary: The method uses hardcoded strings, reducing maintainability and increasing error risk. - Hardcoded ViewData key and value, Hardcoded view name

UX Impact Notes - Summary: Redirects user to 'RedirectView' with specific page context. - User redirected to 'RedirectView' page - Page context set to 'CustomerControlRedundancy' via ViewData

Test Case Ideas - and returned view name. - Method returns 'RedirectView' view

UnderControlled

Summary: Handles HTTP GET requests by setting view data and returning a specific view.

ActionResult ProjectsController.UnderControlled()

Routing

  • HTTP: GET
  • URL: /Projects/UnderControlled
Detailed Analysis

Key Flows - Summary: Handles HTTP GET requests by setting view data and returning a specific view. - Set ViewData['page'] to 'UnderControlled' - Return 'RedirectView' view

UX Impact Notes - Summary: Redirects user to the RedirectView. - User redirection to RedirectView

Test Case Ideas - Summary: Verify UnderControlled handles GET requests - sets ViewData page - and returns RedirectView. - Handle HTTP GET request - Set ViewData 'page' key to 'UnderControlled' - Return 'RedirectView' view

ScheduleAnalysis

Summary: Fetch schedule analysis and observations for the current project and return a populated view.

ActionResult ProjectsController.ScheduleAnalysis(int? isOptimize)

Routing

  • HTTP: GET
  • URL: /Projects/ScheduleAnalysis
View Metadata
  • View: ScheduleAnalysis (Andromeda.Web\Views\Projects\ScheduleAnalysis.cshtml)
  • Model: IList<ScheduleAnalysis>
Detailed Analysis

Key Flows - Summary: Fetch schedule analysis and observations for the current project and return a populated view. - Fetch schedule analysis data using project ID, Fetch schedule observations using project ID - Return view with schedule analysis data

Maintainability Issues - Summary: Rename ScheduleAnalysis to reflect fetching and populating observations for clarity. - Method handles fetching and populating observations

UX Impact Notes - Summary: Displays schedule analysis and observations to enhance project scheduling clarity. - View displaying schedule analysis data, Presentation of relevant project scheduling observations

Test Case Ideas - Summary: Verify ScheduleAnalysis HTTP GET accessibility and correct data population. - Return view with valid project ID schedule analysis data

Dependencies & Called Services - Summary: ScheduleAnalysis depends on IActorModel for actor-related operations. - Dependency on IActorModel for actor operations

GetActivitesJSON

Summary: GetActivitesJSON queries activities by optional project ID and returns them as JSON.

JsonResult ProjectsController.GetActivitesJSON(int? ProjId)

Routing

  • HTTP: GET
  • URL: /Projects/GetActivitesJSON
Detailed Analysis

Key Flows - Summary: GetActivitesJSON queries activities by optional project ID and returns them as JSON. - Return activity objects as JsonResult

Error Flows - Summary: Handles null or invalid project IDs and missing actor or arrow data gracefully. - Handle null or invalid project ID without detailed error response - Provide default empty strings for missing actor names, Provide default empty strings for missing successor IDs

Performance Issues - Summary: Avoid multiple iterations by combining Any() and First() calls on collections. - Multiple iterations from separate Any() and First() calls, Inefficient use of Actors and allArrows collections

Maintainability Issues - Summary: The method uses hardcoded strings that reduce maintainability. - Hardcoded property name strings, Reduced maintainability due to fixed literals

UX Impact Notes - Summary: Returning JsonResult requires correct JSON formatting to ensure good user experience. - Client dependency on correct JSON formatting, Negative UX from improper or incomplete JSON data

Test Case Ideas - Summary: Test GetActivitesJSON response to HTTP GET and empty collections. - Handle HTTP GET requests correctly - Handle empty Actors collection - Handle empty allArrows collection

Dependencies & Called Services - Summary: Uses collections, actor model interface, and integer types. - Enumerable collections, IActorModel interface, Int32 data type

GetAgentData

Summary: GetAgentData retrieves and processes legacy, automation, risk, and schedule data, then generates protected Excel reports.

ActionResult ProjectsController.GetAgentData(string type)

Routing

  • HTTP: GET
  • URL: /Projects/GetAgentData

Cross-layer call chain - ProjectsController.GetAgentData → Andromeda.Core.Entities.Arrow.Clone - ProjectsController.GetAgentData → Andromeda.Core.Services.ProcessExtensions.FindByID - ProjectsController.GetAgentData → Andromeda.Core.Extensions.LinqExtensions.getSkillScore - ProjectsController.GetAgentData → Andromeda.Core.Entities.Activity.ReworkEffort - ProjectsController.GetAgentData → Andromeda.Core.Entities.Activity.TotalEffort - ProjectsController.GetAgentData → Andromeda.Core.Entities.Activity.GetNVAType - ProjectsController.GetAgentData → Insorce.Helpers.Helpers.GetIndividualPath - ProjectsController.GetAgentData → Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone - ProjectsController.GetAgentData → Andromeda.Core.Entities.Actor.WorkEndTimeInProjectZone - ProjectsController.GetAgentData → Andromeda.Core.Entities.Actor.GetLocation - ProjectsController.GetAgentData → Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars - ProjectsController.GetAgentData → Andromeda.Core.Services.ExcelGenerator.CloneRow - ProjectsController.GetAgentData → Andromeda.Core.Services.ExcelGenerator.UpdateCell - Insorce.Helpers.Helpers.GetIndividualPath → Andromeda.Core.Entities.Arrow.Clone - Insorce.Helpers.Helpers.GetIndividualPath → Andromeda.Core.Entities.EdgeInfo.Clone - Andromeda.Core.Entities.Actor.GetLocation → Andromeda.Core.DataManager.GetData

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetData["Andromeda.Core.DataManager.GetData"]
    Andromeda_Core_Entities_Activity_GetNVAType["Andromeda.Core.Entities.Activity.GetNVAType"]
    Andromeda_Core_Entities_Activity_ReworkEffort["Andromeda.Core.Entities.Activity.ReworkEffort"]
    Andromeda_Core_Entities_Activity_TotalEffort["Andromeda.Core.Entities.Activity.TotalEffort"]
    Andromeda_Core_Entities_Actor_GetLocation["Andromeda.Core.Entities.Actor.GetLocation"]
    Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkEndTimeInProjectZone"]
    Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone"]
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Entities_EdgeInfo_Clone["Andromeda.Core.Entities.EdgeInfo.Clone"]
    Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars["Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars"]
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    Andromeda_Core_Services_ExcelGenerator_CloneRow["Andromeda.Core.Services.ExcelGenerator.CloneRow"]
    Andromeda_Core_Services_ExcelGenerator_UpdateCell["Andromeda.Core.Services.ExcelGenerator.UpdateCell"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    Insorce_Helpers_Helpers_GetIndividualPath["Insorce.Helpers.Helpers.GetIndividualPath"]
    ProjectsController_GetAgentData["ProjectsController.GetAgentData"]
    Andromeda_Core_Entities_Actor_GetLocation --> Andromeda_Core_DataManager_GetData
    Insorce_Helpers_Helpers_GetIndividualPath --> Andromeda_Core_Entities_Arrow_Clone
    Insorce_Helpers_Helpers_GetIndividualPath --> Andromeda_Core_Entities_EdgeInfo_Clone
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Activity_GetNVAType
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Activity_ReworkEffort
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Activity_TotalEffort
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Actor_GetLocation
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone
    ProjectsController_GetAgentData --> Andromeda_Core_Entities_Arrow_Clone
    ProjectsController_GetAgentData --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
    ProjectsController_GetAgentData --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProjectsController_GetAgentData --> Andromeda_Core_Services_ExcelGenerator_CloneRow
    ProjectsController_GetAgentData --> Andromeda_Core_Services_ExcelGenerator_UpdateCell
    ProjectsController_GetAgentData --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProjectsController_GetAgentData --> Insorce_Helpers_Helpers_GetIndividualPath
Detailed Analysis

Key Flows - Summary: GetAgentData retrieves and processes legacy, automation, risk, and schedule data, then generates protected Excel reports. - row and cell updates - Processing automation grid data and project paths to generate automation paths and prioritize activities

Error Flows - Summary: Handle missing or incomplete schedule data and prevent null reference exceptions during Excel processing. - Check existence of sheets like Activities - Perform null checks before accessing worksheet parts - Use FirstOrDefault with null checks to safely retrieve collection elements

Security Issues - Summary: Sanitize inputs and validate file paths to prevent SQL injection and path traversal. - SQL injection risk from unsanitized 'ProjId' and 'type' inputs, Path traversal risk in Excel template file path construction, Malformed code fragments causing potential security vulnerabilities

Performance Issues - Summary: Optimize database queries, LINQ usage, memory allocations, and Excel operations for better performance. - Equals) inside loops on large datasets

Maintainability Issues - complex logic - Use of magic strings and numbers reducing readability and increasing error risk, Complex, deeply nested LINQ queries and conditionals hindering readability, Incomplete and malformed code fragments complicating understanding, Non-descriptive and inconsistent variable names, Tight coupling with specific classes reducing flexibility, Lack of comments and documentation for complex operations, Repeated code patterns for Excel manipulation needing refactoring

UX Impact Notes - Summary: GetAgentData returns differently formatted data - Performance issues cause delays with large datasets

Test Case Ideas - Summary: Test data retrieval, processing accuracy, report generation, performance, and security robustness. - cell updates - Performance testing with large datasets to detect bottlenecks

Dependencies & Called Services - Summary: Uses data models, collections, file handling, Excel processing, and utility helpers. - Data models interfaces (IActorModel, IControlModel, IFinalPlanModel, IInfraModel, IProcessModel, IRiskModel), Collections and LINQ (Enumerable, List, LinqExtensions), Primitive types and conversions (Boolean, Int32, Decimal, Double, String, DateTime, UTF8Encoding), File and directory operations (File, Directory, Path), Excel processing (ExcelGenerator, SpreadsheetDocument, OpenXmlCompositeElement, OpenXmlElement, OpenXmlPartContainer, OpenXmlPartRootElement), Utility helpers (Helpers, HttpServerUtility, Math, Convert, ProcessExtensions), Domain entities (Activity, Actor, Arrow)

GetProjectChanges

Summary: GetProjectChanges retrieves project changes, activities, and actor locations, stores them in ViewData, and returns the view.

ActionResult ProjectsController.GetProjectChanges()

Routing

  • HTTP: GET
  • URL: /Projects/GetProjectChanges

Cross-layer call chain - ProjectsController.GetProjectChanges → Andromeda.Core.DataManager.GetData - ProjectsController.GetProjectChanges → Andromeda.Core.Database.DataExtensions.GetInt32Ex - ProjectsController.GetProjectChanges → Andromeda.Core.Database.DataExtensions.GetStringEx - ProjectsController.GetProjectChanges → Andromeda.Core.Database.DataExtensions.GetDateTimeEx

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetData["Andromeda.Core.DataManager.GetData"]
    Andromeda_Core_Database_DataExtensions_GetDateTimeEx["Andromeda.Core.Database.DataExtensions.GetDateTimeEx"]
    Andromeda_Core_Database_DataExtensions_GetInt32Ex["Andromeda.Core.Database.DataExtensions.GetInt32Ex"]
    Andromeda_Core_Database_DataExtensions_GetStringEx["Andromeda.Core.Database.DataExtensions.GetStringEx"]
    ProjectsController_GetProjectChanges["ProjectsController.GetProjectChanges"]
    ProjectsController_GetProjectChanges --> Andromeda_Core_DataManager_GetData
    ProjectsController_GetProjectChanges --> Andromeda_Core_Database_DataExtensions_GetDateTimeEx
    ProjectsController_GetProjectChanges --> Andromeda_Core_Database_DataExtensions_GetInt32Ex
    ProjectsController_GetProjectChanges --> Andromeda_Core_Database_DataExtensions_GetStringEx
View Metadata
  • View: GetProjectChanges (Andromeda.Web\Views\Projects\GetProjectChanges.cshtml)
  • Model: ProjectChanges
Detailed Analysis

Key Flows - and returns the view. - Return corresponding view

Performance Issues - Summary: Multiple database calls cause performance degradation without caching or optimization. - Multiple database calls, Lack of caching, No query optimization

Maintainability Issues - Summary: Use descriptive variable names to improve code readability and maintainability. - Non-descriptive variable names, Rename 'Pid' to 'projectId'

UX Impact Notes - Summary: Displays project changes, activities, and actors to the user. - View displays project changes, View shows related activities, View presents involved actors

Test Case Ideas - Summary: Verify GetProjectChanges retrieves and returns correct project data and view. - Handle HTTP GET request correctly - Return view with expected ViewData

Dependencies & Called Services - Summary: Uses Enumerable for collections and interfaces IActorModel and IRiskModel for data models. - Enumerable for collection operations, IActorModel interface for actor data, IRiskModel interface for risk data

ContactCustomerSucTeam

Summary: Retrieve project data, generate OTP, email CST with details, store approval code, and return JSON response.

JsonResult ProjectsController.ContactCustomerSucTeam()

Routing

  • HTTP: POST
  • URL: /Projects/ContactCustomerSucTeam
Detailed Analysis

Key Flows - and return JSON response. - Send email to CST with discrepancy details and OTP - Return JSON with project ID and OTP

Security Issues - Summary: The method exposes the application to XSS, email injection, and unsanitized input risks. - Disabled input validation enabling XSS attacks, Email injection risk from unsanitized user input in email body, Unsanitized 'sRandomOTP' parameter in JSON response

Performance Issues - Summary: Optimize email body construction to reduce string concatenation overhead. - Multiple string concatenations in email body construction, Potential performance degradation from inefficient string handling

Maintainability Issues - Summary: The method uses unclear naming and hardcoded strings, reducing code clarity and maintainability. - Use of magic strings like 'data' and 'CSTEmails', Undefined variable 'CSTE' causing ambiguity, Hardcoded values in email body construction, Poorly named method 'e' lacking clear purpose

UX Impact Notes - Summary: Ensure proper email formatting and correct approval code generation to maintain user experience. - Proper email body formatting, Correct approval code generation, Reliable JSON response from 'e' method

Test Case Ideas - email sending - Handle whitespace string for CST emails - Retrieve CST emails from application settings - Send email with correct subject and body - Return expected JSON response for various inputs

Dependencies & Called Services - Summary: Uses interfaces and data types for actor, login, membership, and basic data handling. - ILoginModel interface

UpdateProjectStatus

Summary: UpdateProjectStatus retrieves the current project ID, sets its status to default, inserts an empty approval code, and updates the registry.

JsonResult ProjectsController.UpdateProjectStatus()

Routing

  • HTTP: POST
  • URL: /Projects/UpdateProjectStatus

Cross-layer call chain - ProjectsController.UpdateProjectStatus → Andromeda.Core.Services.Registry.setProjectDetails - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    ProjectsController_UpdateProjectStatus["ProjectsController.UpdateProjectStatus"]
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProjectsController_UpdateProjectStatus --> Andromeda_Core_Services_Registry_setProjectDetails
Detailed Analysis

Key Flows - Summary: UpdateProjectStatus retrieves the current project ID - sets its status to default - and updates the registry. - Set project status to ProjectStage.Default - Update project details in registry

Security Issues - Summary: Inserting approval code as an empty string creates a security vulnerability. - Potential unauthorized project status update

Performance Issues - Summary: UpdateProjectStatus updates project details without existence or necessity checks - Update project details without change necessity check

Maintainability Issues - Summary: Using unexplained magic number ProjectStage.Default reduces code clarity and maintainability. - Unexplained magic number ProjectStage.Default usage, Lack of code comments for ProjectStage.Default

Test Case Ideas - Summary: Verify UpdateProjectStatus updates project status - Invoke UpdateProjectStatus on HTTP POST - Update project status correctly - Update project details correctly

Dependencies & Called Services - Summary: UpdateProjectStatus uses conversion and models for actor - Conversion utility, IActorModel interface, IProjectModel interface, Registry service

DeleteProjectPermission

Summary: DeleteProjectPermission updates project details in the registry when necessary.

JsonResult ProjectsController.DeleteProjectPermission(string PermissionId, string ScreenFrom, int ProjectId, string UserName)

Routing

  • HTTP: POST
  • URL: /Projects/DeleteProjectPermission

Cross-layer call chain - ProjectsController.DeleteProjectPermission → Andromeda.Core.Services.Registry.UserForceLogOffByProject - ProjectsController.DeleteProjectPermission → Andromeda.Core.Services.Registry.setProjectDetails - ProjectsController.DeleteProjectPermission → Andromeda.Core.Services.SignalRMsg.SendMessage - Andromeda.Core.Services.Registry.UserForceLogOffByProject → Andromeda.Core.Services.SignalRMsg.SendMessage - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString - Andromeda.Core.Services.SignalRMsg.SendMessage → Andromeda.Core.LoggingManager.Info - Andromeda.Core.Services.SignalRMsg.SendMessage → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    Andromeda_Core_Services_Registry_UserForceLogOffByProject["Andromeda.Core.Services.Registry.UserForceLogOffByProject"]
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Services_SignalRMsg_SendMessage["Andromeda.Core.Services.SignalRMsg.SendMessage"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    ProjectsController_DeleteProjectPermission["ProjectsController.DeleteProjectPermission"]
    Andromeda_Core_Services_Registry_UserForceLogOffByProject --> Andromeda_Core_Services_SignalRMsg_SendMessage
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Info
    ProjectsController_DeleteProjectPermission --> Andromeda_Core_Services_Registry_UserForceLogOffByProject
    ProjectsController_DeleteProjectPermission --> Andromeda_Core_Services_Registry_setProjectDetails
    ProjectsController_DeleteProjectPermission --> Andromeda_Core_Services_SignalRMsg_SendMessage
Detailed Analysis

Key Flows - Summary: DeleteProjectPermission updates project details in the registry when necessary. - Update project details in registry if applicable

Error Flows - Summary: Handle null references and user ID mismatches during project permission deletion. - Null reference exceptions from incomplete or malformed input, Incomplete audit processing due to input issues, Alternative flows triggered on user ID comparison failure, SignalR messages sent when user not found

Security Issues - Summary: DeleteProjectPermission risks unauthorized access and data leaks without proper validation and authorization. - User ID comparisons without explicit authorization checks

Performance Issues - Summary: No performance issues identified in DeleteProjectPermission method.

Maintainability Issues - Summary: Code suffers from poor readability and maintainability due to unclear structure and naming. - Incomplete and truncated code segments, Multiple unrelated tasks in single code blocks, Undocumented magic strings and hardcoded values, Variable name typos like 'ojectId' instead of 'objectId'

UX Impact Notes - Summary: DeleteProjectPermission communicates status and triggers real-time updates - but forces user logoff disrupting workflow. - Return JsonResult for success or error messages - Force user logoff disrupting workflow - Send SignalR messages for real-time notifications

Test Case Ideas - Summary: Verify DeleteProjectPermission returns success with valid input. - Successful JsonResult with valid parameters

Dependencies & Called Services - Summary: DeleteProjectPermission uses models and system utilities for processing and messaging. - IProcessModel interface, IProjectModel interface, Enumerable utilities, Registry access, SignalR messaging, Char and Int32 data types

PopUpTeamMembers

Summary: Group team member data and return it as a JSON response.

JsonResult ProjectsController.PopUpTeamMembers(int ProjectId)

Routing

  • HTTP: GET
  • URL: /Projects/PopUpTeamMembers
Detailed Analysis

Key Flows - Summary: Group team member data and return it as a JSON response. - Return JSON response

Error Flows - Summary: The method lacks explicit error handling for invalid project IDs and exceptions. - Missing error handling for invalid project IDs, No exception handling described

Performance Issues - Summary: Loading entire dataset into memory degrades performance for large datasets. - Loading large datasets causes performance degradation - Use of ToList() loads entire dataset into memory

Maintainability Issues - Summary: Anonymous types in LINQ reduce code clarity and maintainability. - Use of anonymous types in LINQ projection reduces code clarity, Anonymous types complicate code maintenance

UX Impact Notes - Summary: Returns JSON to populate team members popup - JSON response for team members popup, Grouped team member information display, Improved user experience

Test Case Ideas - Summary: Verify HTTP GET routing and correct grouped data return for valid project ID. - Correct grouped data return for valid project ID

Dependencies & Called Services - Summary: Uses Enumerable for collection operations, IProcessModel for process handling, and Projects for project data. - Enumerable for collection operations, IProcessModel for process handling, Projects for project data

GetName

Summary: GetName returns specific role name strings based on the ProjectRoles enum input using a switch statement.

string ProjectsController.GetName(ProjectRoles role)

Routing

  • URL: /Projects/GetName
Detailed Analysis

Key Flows - Summary: GetName returns specific role name strings based on the ProjectRoles enum input using a switch statement. - Return role-specific name strings

Error Flows - Summary: Fix string literals, complete switch cases, and remove unfinished code to prevent errors. - Incomplete switch cases missing return statements causing runtime errors

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

Maintainability Issues - Summary: Incomplete switch, hardcoded magic strings, and commented code reduce maintainability. - Incomplete switch statements with missing return values

UX Impact Notes - Summary: Ensure complete, clear strings and localizable role labels for consistent user interface. - Incomplete or truncated returned strings confuse users

Test Case Ideas - Summary: Verify GetName returns correct strings for all ProjectRoles and handles missing cases. - Test GetName with all ProjectRoles enum values, Test error handling for incomplete or missing switch cases - Validate 'Solution Archite' return for ProjectRoles.Appro - Validate 'Delivery Leader:' return for Reviewer role - Validate 'Sponsor:' return for sponsor role - Validate 'Process' return for 'Maker' label

DiagnosticSummary

Summary: Retrieve project ID, fetch comparison data, populate view data, and return diagnostic summary view.

ActionResult ProjectsController.DiagnosticSummary()

Routing

  • HTTP: GET
  • URL: /Projects/DiagnosticSummary
View Metadata
  • View: DiagnosticSummary (Andromeda.Web\Views\Projects\DiagnosticSummary.cshtml)
  • Model: ProjectDataEntity
Detailed Analysis

Key Flows - and return diagnostic summary view. - Fetch project comparison data - Return diagnostic summary view

Error Flows - Summary: Skip JSON decoding if MeasuresJson is null; lack explicit error handling for JSON or data errors. - Skip JSON decoding when MeasuresJson is null, No explicit exception handling for JSON decoding errors, No explicit exception handling for data retrieval failures

Performance Issues - Summary: Excessive database calls without caching degrade performance. - Multiple database calls for activities, groups, objectives, and risks, Lack of caching or query optimization

Maintainability Issues - Summary: Correct class name and avoid anonymous types for clearer, maintainable code. - Misspelled class name 'ProjectDataEntit' should be 'ProjectDataEntity', Avoid anonymous types in ViewData to improve code clarity and maintainability

UX Impact Notes - Summary: Delayed or improper ViewData handling degrades user experience. - Dependency on populated ViewData, Risk of UX degradation from data retrieval delays

Test Case Ideas - Summary: Verify data accuracy, view rendering, and optimize database performance. - Confirm DiagnosticSummary action returns expected result with valid project ID - Validate GetProjectComparisionData returns correct data for valid project ID

Dependencies & Called Services - Summary: Uses multiple service interfaces for processing, project, and risk management. - Enumerable service collection, IProcessModel interface, IProjectModel interface, IRiskModel interface

Helper Methods

Initialize

Summary: Initialize method calls the base class's Initialize with the given RequestContext.

void ProjectsController.Initialize(System.Web.Routing.RequestContext requestContext)

Routing

  • HTTP: GET
  • URL: /Projects/Initialize
Detailed Analysis

Key Flows - Summary: Initialize method calls the base class's Initialize with the given RequestContext. - Call base Initialize with RequestContext

Maintainability Issues - Summary: Direct instantiation causes tight coupling, reducing maintainability. - Tight coupling with AccountMembershipService, Direct instantiation within method

Test Case Ideas - Summary: Ensure Initialize handles HTTP GET - and calls base after setup. - Initialize handles HTTP GET requests - Base Initialize called after MembershipService setup