Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-2088

Make the synchronization_enabled option effective locally in certain conditions

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.4.0
    • Fix Version/s: 4.4.2
    • Component/s: Configuration

      Description

      Issue

      Scenario:

      • the synchronization_enabled parameter is set on the server's config.
      • at the next start, the synchronization_enabled is set in the local config and different from the server's value, then it will have no effect

      Wanted Behavior

      The local value should be taken into account.

      Analysis

      The whole block of code:

      # Handle synchronization state early
      sync_enabled = self.dao.get_config("synchronization_enabled")
      if sync_enabled is not None:
          # If the option has been set from another conf source, it has the precedence
          # over the old (and maybe obsolete) value stored in the database
          if (
              Options.options["synchronization_enabled"][1] != "default"
              and Options.synchronization_enabled != sync_enabled
          ):
              # Update the value stored in the database using the the global options value
              self.dao.update_config("sync_enabled", Options.synchronization_enabled)
          else:
              # Update global options using the value stored in the database
              Options.synchronization_enabled = sync_enabled != "0"
      

      That line is bad:

      self.dao.update_config("sync_enabled", Options.synchronization_enabled)
      

      Here we can see that the parameter we are looking for is "synchronization_enabled" but when saving into the database we use "sync_enabled". So the preference is never used.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.