Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-20529

File custom field in multi-record field set displays first record's file for all records

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      Yes
    • Overview:
      Patch to correct incorrect behaviour of functions underlying the Custom record View pop-up affecting file attachments.
    • How it works currently:
      Hide
      Custom record View pop-up displays incorrect file links if more than one custom record containing a file per contact.
      Steps to reproduce are in description.
      Show
      Custom record View pop-up displays incorrect file links if more than one custom record containing a file per contact. Steps to reproduce are in description.
    • How it should work:
      Step 3 in Description: The file link should be to the correct file.
    • Acceptance Criteria:
      Custom record View pop-up displays correct file's link regardless of number of records with attached files per contact.

      Description

      Steps to reproduce:

      1. Create a custom field set with a file field and another field e.g. integer, and set to allow multiple records and display as tab with table. (Note: you need the second field because if the custom field set only contains a file field then when a record is added an error is given, "One of parameters (value: -0) is not of the type Integer".)
      2. Add at least two records of this new type to a contact, with a different file attached to each record.
      3. View (not Edit) the second record and the file link dispplayed will be for the first record's file and not this record's.

      Editing the record gives the correct file link; it's only View that has the problem.

      Tested on the 4.7.19 release and also confirmed on dmaster.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              andrewpthompson Andrew Thompson
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: