CRM-11895 civicrm allows contacts to be reserved more than once for the same survey

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.7
    • Fix Version/s: 4.3.0
    • Component/s: CiviCampaign
    • Labels:
      None

      Description

      It only happens in a particular use case:

      • Click Campaign -> Reserve Respondents
      • Select a Group and click Search
      • Note the number of contacts returned (say it's 100)
      • Select one member of the group and reserve that member
      • You are returned to the search screen, but now the total number of contacts is 99 (which is correct, since one of the members of the group is already reserved)
      • Now, click the All records option and reserve all the records returned

      Instead of getting a message saying 99 records selected, it says 100 records are selected. And when I reserve them, all 100 people in the group are reserved, including the 1 contact I had previously reserved (which now has two reservation activities).

      I've attached a patch, but the patch is a desperate attempt to get it working without really understanding the bigger picture, so a careful review would be great (and it probably needs to be re-written).

      Thanks!

        Attachments

          Activity

          [CRM-11895] civicrm allows contacts to be reserved more than once for the same survey
          Deepak Srivastava added a comment -

          To me it appeared more of a "search & contact pickup" bug.

          Have fixed campaign search to work with prev-next cache and show counts based on cache, like core search.
          Seems to work now, with correct set of contacts and counts.

          Have a check.

          Jamie McClelland added a comment -

          Ack - sorry, i already QA'ed this. Thanks for the quick fix and apologies for not getting back to you sooner. It works like a charm.

            People

            • Assignee:
              Jamie McClelland
              Reporter:
              Jamie McClelland

              Dates

              • Created:
                Updated:
                Resolved: