Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-3161

Cannot create contact if the 'unique_contact_email' setting is undefined

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.6.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      CORE-3123 created teh 'unique_contact_emails' setting. However, if it has not been defined for the company yet, attempting to create a contact will fail with an error:

      Undefined index 'value' on line 1024 of /app/models/contacts.php

      When fetching a single client setting via the SettingsCollection, the result is automatically cast to an array, therefore, it becomes [0 => false].

      1. Update the contact validation rule to ensure that the contact setting is set and has the key 'value'.
      2. Update the contact validation rule to only check contacts in the client's company. The same email address can be set for contacts that belong to other companies

        Issue Links

          Activity

          tyson Tyson Phillips (Inactive) created issue -
          tyson Tyson Phillips (Inactive) made changes -
          Field Original Value New Value
          Sprint 4.6.0 beta Sprint 1 [ 86 ]
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue Discovered while testing CORE-3123 [ CORE-3123 ]
          tyson Tyson Phillips (Inactive) made changes -
          Description CORE-3123 created teh 'unique_contact_emails' setting. However, if it has not been defined for the company yet, attempting to create a contact will fail with an error:

          {quote}
          Undefined index 'value' on line 1024 of /app/models/contacts.php
          {quote}

          When fetching a single client setting via the SettingsCollection, the result is automatically cast to an array, therefore, it becomes [0 => false].

          # Update the contact validation rule to ensure that the contact setting is set and has the key 'value'.
          CORE-3123 created teh 'unique_contact_emails' setting. However, if it has not been defined for the company yet, attempting to create a contact will fail with an error:

          {quote}
          Undefined index 'value' on line 1024 of /app/models/contacts.php
          {quote}

          When fetching a single client setting via the SettingsCollection, the result is automatically cast to an array, therefore, it becomes [0 => false].

          # Update the contact validation rule to ensure that the contact setting is set and has the key 'value'.
          # Update the contact validation rule to only check contacts in the client's company. The same email address can be set for contacts that belong to other companies
          tyson Tyson Phillips (Inactive) made changes -
          Fix Version/s 4.6.0-b1 [ 11117 ]
          tyson Tyson Phillips (Inactive) made changes -
          Assignee Tyson Phillips [ tyson ]
          Automated transition triggered when Tyson Phillips (Inactive) created a branch in Stash -
          Status Open [ 1 ] In Progress [ 3 ]
          Automated transition triggered when Tyson Phillips (Inactive) created pull request #673 in Stash -
          Status In Progress [ 3 ] In Review [ 5 ]
          Resolution Fixed [ 1 ]
          tyson Tyson Phillips (Inactive) made changes -
          Remaining Estimate 0 minutes [ 0 ]
          Time Spent 1 hour, 11 minutes [ 4260 ]
          Worklog Id 12279 [ 12279 ]
          Automated transition triggered when Tyson Phillips (Inactive) merged pull request #673 in Stash -
          Status In Review [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              tyson Tyson Phillips (Inactive)
              Reporter:
              tyson Tyson Phillips (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                28/May/19

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 11 minutes
                1h 11m

                  Agile