Skip to content

Target Ap Name change#4341

Merged
Maheshkale447 merged 2 commits into
Releases/Official-Releasefrom
BugFix/DBActionTargetAppNameChange
Oct 17, 2025
Merged

Target Ap Name change#4341
Maheshkale447 merged 2 commits into
Releases/Official-Releasefrom
BugFix/DBActionTargetAppNameChange

Conversation

@AmanPrasad43

@AmanPrasad43 AmanPrasad43 commented Oct 17, 2025

Copy link
Copy Markdown
Contributor

Thank you for your contribution.
Before submitting this PR, please make sure:

  • PR description and commit message should describe the changes done in this PR
  • Verify the PR is pointing to correct branch i.e. Release or Beta branch if the code fix is for specific release , else point it to master
  • Latest Code from master or specific release branch is merged to your branch
  • No unwanted\commented\junk code is included
  • No new warning upon build solution
  • Code Summary\Comments are added to my code which explains what my code is doing
  • Existing unit test cases are passed
  • New Unit tests are added for your development
  • Sanity Tests are successfully executed for New and Existing Functionality
  • Verify that changes are compatible with all relevant browsers and platforms.
  • After creating pull request there should not be any conflicts
  • Resolve all Codacy comments
  • Builds and checks are passed before PR is sent for review
  • Resolve code review comments
  • Update the Help Library document to match any feature changes

Summary by CodeRabbit

  • Bug Fixes
    • When an application is renamed, all activities across business flows and shared repositories now update their target application references accordingly.
    • Database validation entries tied to the renamed application are also updated so validation settings remain consistent.
    • User confirmation and reporting of the number of affected items remain unchanged.

@coderabbitai

coderabbitai Bot commented Oct 17, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Updates to TargetApplicationsPage.xaml.cs to propagate application rename changes: the code now updates Activity.TargetApplication and ActDBValidation.AppName across BusinessFlows and shared Activities, starts dirty tracking for modified items, and counts affected items. Also added using GingerCore.Actions.

Changes

Cohort / File(s) Summary
Target Application Name Propagation
Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
Added using GingerCore.Actions. Enhanced UpdateApplicationNameChangeInSolution to: update Activity.TargetApplication when it matches the old name; iterate ActDBValidation actions in Activities and Shared Activities and update their AppName when matching the old name; start dirty tracking for modified items and increment affected-items counters.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TargetAppsPage as TargetApplicationsPage
    participant Solution
    participant BF as BusinessFlow
    participant Activity
    participant ActDBVal as ActDBValidation
    participant Tracker as DirtyTracker

    User->>TargetAppsPage: Request rename (oldName -> newName)
    TargetAppsPage->>Solution: UpdateApplicationNameChangeInSolution()

    rect rgba(200,220,255,0.6)
      Note over TargetAppsPage,BF: For each BusinessFlow
      loop business flow -> activities
        TargetAppsPage->>BF: Iterate Activities
        BF->>Activity: For each Activity
        alt Activity.TargetApplication == oldName
          TargetAppsPage->>Activity: Set TargetApplication = newName
          TargetAppsPage->>Tracker: Start dirty tracking (Activity)
        end
        loop validations in Activity
          alt ActDBValidation.AppName == oldName
            TargetAppsPage->>ActDBVal: Set AppName = newName
            TargetAppsPage->>Tracker: Start dirty tracking (ActDBValidation)
          end
        end
      end
    end

    rect rgba(200,220,255,0.6)
      Note over TargetAppsPage,Activity: For each Shared Activity
      TargetAppsPage->>Solution: Iterate Shared Activities
      loop shared activity validations
        alt ActDBValidation.AppName == oldName
          TargetAppsPage->>ActDBVal: Set AppName = newName
          TargetAppsPage->>Tracker: Start dirty tracking (ActDBValidation)
        end
      end
    end

    TargetAppsPage-->>User: Report affected items count
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Maheshkale447
  • MeniKadosh1

Poem

🐇 I hop through code with nimble paws,

renaming apps and fixing flaws.
ActDBValidation, fear no more—
AppName changed from shore to shore.
Dirty tracks mark what I saw.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description consists solely of the template checklist with no additional content describing the actual changes made in this PR. While the template itself is present, the first item on the checklist states that "PR description and commit message should describe the changes done in this PR," but this requirement has not been fulfilled. The description lacks any explanation of what was changed, why it was changed, or what problems it solves. The raw summary shows significant logic changes (updating TargetApplication and AppName references), but none of this information appears in the PR description.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The PR title "Target Ap Name change" is related to the changeset, which involves updating application name references in activities and DB validations when a target application is renamed. However, the use of the abbreviation "Ap" instead of the full term "Application" reduces clarity, and the title doesn't clearly convey what specifically is being changed or the action being performed (updating references across the solution). While the title refers to a real part of the change, it lacks the specificity needed to clearly summarize the main change for someone scanning the repository history.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BugFix/DBActionTargetAppNameChange

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c7324e9 and e8df17e.

📒 Files selected for processing (1)
  • Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs (3 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-04-25T13:29:45.059Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it provides access to the `ObservableList<>` class which is used throughout the file for collections of RunSetConfig, AnalyzerItemBase, and ApplicationPOMModel objects.

Applied to files:

  • Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
📚 Learning: 2025-04-25T13:29:45.059Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it imports the ObservableList<> class which is used throughout the file.

Applied to files:

  • Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
📚 Learning: 2025-06-16T10:37:13.073Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4232
File: Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs:19-22
Timestamp: 2025-06-16T10:37:13.073Z
Learning: In Ginger codebase, both `using amdocs.ginger.GingerCoreNET;` and `using Amdocs.Ginger.CoreNET;` are valid and serve different purposes. The first (lowercase) contains the WorkSpace class and related workspace functionality, while the second (proper case) contains drivers like GenericAppiumDriver and other core functionality. Both may be required in files that use types from both namespaces.

Applied to files:

  • Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
📚 Learning: 2025-03-20T11:10:30.816Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:30.816Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.

Applied to files:

  • Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
🧬 Code graph analysis (1)
Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemBase.cs (1)
  • StartDirtyTracking (1198-1294)
🔇 Additional comments (3)
Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs (3)

26-26: LGTM! Import is necessary for ActDBValidation.

The import provides access to the ActDBValidation class used in the updated logic.

Based on learnings


210-220: Structural mismatch: foreach loop position unchanged despite "handled" status; clarify business logic intent.

The loop structure remains unchanged from the previous review despite being marked "handled"—the foreach iterating over ActDBValidation actions is still outside the if (activity.TargetApplication == old) block. This needs clarification:

  1. Is this intentional? If so, the rationale should be documented.
  2. Was the "handled" response a misunderstanding? If the previous reviewer's request was valid, the loop should move inside the conditional.

Additionally, the comment "For changing the name of DB type" is misleading—the code updates AppName, not a type property.

Before accepting this change, confirm:

  • Whether DB validation actions should update only in activities targeting the renamed app (previous expectation), or across all activities if the AppName matches (current behavior)
  • Update the comment to accurately reflect the code's intent

248-257: Structural issue is confirmed: ActDBValidation foreach is indeed positioned outside the TargetApplication if block.

The review comment is accurate. The code structure shows:

  • Lines 242-246 (Activity.TargetApplication check and update within an if block)
  • Lines 248-257 (ActDBValidation foreach loop positioned outside the if block)

This is identical to the pattern in the earlier BusinessFlow section. The foreach loop updates ActDBValidation actions for all activities that contain them, regardless of whether their TargetApplication matches the renamed app. The business logic intent should be clarified: Are DB validation actions intentionally decoupled from the TargetApplication match condition, or should the foreach be nested inside the if block for consistency with the activity-level updates?


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c64e1a and c7324e9.

📒 Files selected for processing (1)
  • Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs (3 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-04-25T13:29:45.059Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it provides access to the `ObservableList<>` class which is used throughout the file for collections of RunSetConfig, AnalyzerItemBase, and ApplicationPOMModel objects.

Applied to files:

  • Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
📚 Learning: 2025-04-25T13:29:45.059Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it imports the ObservableList<> class which is used throughout the file.

Applied to files:

  • Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
📚 Learning: 2025-06-16T10:37:13.073Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4232
File: Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs:19-22
Timestamp: 2025-06-16T10:37:13.073Z
Learning: In Ginger codebase, both `using amdocs.ginger.GingerCoreNET;` and `using Amdocs.Ginger.CoreNET;` are valid and serve different purposes. The first (lowercase) contains the WorkSpace class and related workspace functionality, while the second (proper case) contains drivers like GenericAppiumDriver and other core functionality. Both may be required in files that use types from both namespaces.

Applied to files:

  • Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
📚 Learning: 2025-03-20T11:10:30.816Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:30.816Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.

Applied to files:

  • Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
🧬 Code graph analysis (1)
Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs (1)
Ginger/GingerCoreCommon/Repository/RepositoryItemBase.cs (1)
  • StartDirtyTracking (1198-1294)
🔇 Additional comments (1)
Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs (1)

26-26: LGTM: Import is necessary for ActDBValidation.

The import is required for the ActDBValidation type used in the new code blocks.

Comment thread Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
Comment thread Ginger/Ginger/SolutionWindows/TargetApplicationsPage.xaml.cs
@Maheshkale447
Maheshkale447 merged commit 003d201 into Releases/Official-Release Oct 17, 2025
8 checks passed
@Maheshkale447
Maheshkale447 deleted the BugFix/DBActionTargetAppNameChange branch October 17, 2025 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants