• 
      

    Add built-in support for using conditions in integrations.

    Review Request #8369 — Created Aug. 31, 2016 and submitted

    Information

    Review Board
    release-3.0.x
    7d877bf...

    Reviewers

    Integrations that want to work with conditions can now do so by adding
    one or more ConditionsFields to their configuration form. These will
    automatically be set up with the appropriate Local Site, ensuring that
    any querysets contained within are LocalSite-aware. The integration can
    then match against those conditions when iterating through the list of
    enabled configurations through a new config.match_conditions() method.

    This all makes it very easy for an integration to allow for
    customization based on conditions, without being locked into a
    pre-determined set of condition choices or use cases.

    Unit tests passed.

    Manually tested all this with a new Slack integration.

    reviewbot
    1. Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/testing/testcase.py
          reviewboard/integrations/forms.py
          reviewboard/integrations/models.py
          reviewboard/integrations/tests/test_configs.py
          reviewboard/integrations/tests/test_views.py
          reviewboard/integrations/tests/test_forms.py
          reviewboard/integrations/views.py
      
      Ignored Files:
          reviewboard/integrations/tests/__init__.py
      
      
      
      Tool: Pyflakes
      Processed Files:
          reviewboard/testing/testcase.py
          reviewboard/integrations/forms.py
          reviewboard/integrations/models.py
          reviewboard/integrations/tests/test_configs.py
          reviewboard/integrations/tests/test_views.py
          reviewboard/integrations/tests/test_forms.py
          reviewboard/integrations/views.py
      
      Ignored Files:
          reviewboard/integrations/tests/__init__.py
      
      
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (7859274)