Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-11662

Bitbucket incorrectly calculates number of users associated with a repository. (BB-13948)

    XMLWordPrintable

Details

    Description

      Hi,

      Bitbucket incorrectly calculates the number of users to charge you for. This is happening for me; but I will give an example of how it can happen to anyone.

      1. I was invited to join a team, and then fork one of the repositories
      2. As part of the standard review process, I am required to add-in a group which that team controls. It contains 3 members (I am well within my 5 user count).
      3. work continues
      4. They add additional people, bringing the number in the team that they control to 3000.

      Who should pay for those extra 3000 users? The currently bitbucket algorithm believes that I should.

      I think the algorithm to determine users should be fairly simple:

      def users_chargable_on_repo(repo):
          to_charge = count_direct_users(repo)
          to_charge += count_users_within_groups_created_by_repo_forker(repo)
      

      And then obviously you would tally up all users across all repos and then put into a set (so they aren't duplicated), giving you a total number to charge.

      In my case the number should be 2. Which is under the 5 free threshold.

      If you are able to give me a (rough) outline of the current algorithm and
      some test cases, I am sure I could easily come up with a correct solution
      for you.

      As you can imagine, I am highly motivated to fix this billing problem.

      Thanks,
      Anand

      Attachments

        Activity

          People

            Unassigned Unassigned
            legacy-bitbucket-user Legacy Bitbucket Cloud User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: