Hello,

      When using the bitbucket-branch-source-plugin, the plugin produces the following structure in Jenkins (example):

      Jenkins
      └─ (folder) BitbucketProjectName
              ├── (folder) RepoName
              │         ├── (job) aBranch
              |         └── (job) otherBranch
              ...
      

      The execution of a job produces the following workspaces:

      {JENKINS_HOME}/workspace/cketProjectName_RepoName_aBranch@libs
      {JENKINS_HOME}/workspace/ProjectName_RepoName_otherBranch@libs
      

      The resulting workspace paths are unexpected to me in multiple ways:

      1. The workspace paths are shortened
        The responsible limit which is responsible for the shortening can be found here: https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-2.5.6/src/main/java/jenkins/branch/WorkspaceLocatorImpl.java#L100
        The
      2. The workspace paths do not use subfolders
        The responsible method can be found here: https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-2.5.6/src/main/java/jenkins/branch/WorkspaceLocatorImpl.java#L360

      My issues with the observed behavior:
      Usually jobs in folders produce workspaces like {JENKINS_HOME}/workspace/aFolder/aSubFolder/aJob@libs. Why does the branch-api-plugin produce workspaces in a different way ?
      More precisely, why does the branch-api-plugin replace the slashes `/` with underscores `_` ?

      If the slashes were not replaced, the resulting workspace paths would simply leverage subfolders like other jobs in folders. So I wonder: Is this behavior really intended, or is this a bug ?

          [JENKINS-63158] Replacement of slashes in workspace paths

          Stefan Hölzle created issue -
          Stefan Hölzle made changes -
          Environment Original: java.runtime.name OpenJDK Runtime Environment
          java.runtime.version 11.0.6+10-post-Debian-1deb10u1
          Jenkins 2.235.1
          branch-api 2.5.6
          cloudbees-bitbucket-branch-source 2.8.0
          New: OpenJDK 11.0.6
          Jenkins 2.235.1
          branch-api 2.5.6
          cloudbees-bitbucket-branch-source 2.8.0

          Tobias added a comment -

          No comment after 6 months? 

          Tobias added a comment - No comment after 6 months? 
          Nikolas Falco made changes -
          Assignee New: Nikolas Falco [ nfalco ]

          Nikolas Falco added a comment -

          Is this bug still present in latest plugin version?

          Nikolas Falco added a comment - Is this bug still present in latest plugin version?
          Nikolas Falco made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            nfalco Nikolas Falco
            shoelzle Stefan Hölzle
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: