~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/model/bug.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-09-29 20:54:34 UTC
  • mfrom: (14062.2.5 ask-question-from-bug)
  • Revision ID: launchpad@pqm.canonical.com-20110929205434-2tilu1e9q4s8d6hd
[r=jcsackett][bug=860565] Disable ask/convert to question in Bugs
 when the project does not use Answers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1387
1387
        if len(non_invalid_bugtasks) != 1:
1388
1388
            return None
1389
1389
        [valid_bugtask] = non_invalid_bugtasks
1390
 
        if valid_bugtask.pillar.bug_tracking_usage == ServiceUsage.LAUNCHPAD:
 
1390
        pillar = valid_bugtask.pillar
 
1391
        if (pillar.bug_tracking_usage == ServiceUsage.LAUNCHPAD
 
1392
            and pillar.answers_usage == ServiceUsage.LAUNCHPAD):
1391
1393
            return valid_bugtask
1392
1394
        else:
1393
1395
            return None
1660
1662
        f_flag_str = 'disclosure.enhanced_private_bug_subscriptions.enabled'
1661
1663
        f_flag = bool(getFeatureFlag(f_flag_str))
1662
1664
        if f_flag:
1663
 
            # Before we update the privacy or security_related status, we need to
1664
 
            # reconcile the subscribers to avoid leaking private information.
 
1665
            # Before we update the privacy or security_related status, we
 
1666
            # need to reconcile the subscribers to avoid leaking private
 
1667
            # information.
1665
1668
            if (self.private != private
1666
1669
                    or self.security_related != security_related):
1667
1670
                self.reconcileSubscribers(private, security_related, who)