~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2011-09-21 14:28:02 UTC
  • mfrom: (14006 devel)
  • mto: This revision was merged to the branch mainline in revision 14010.
  • Revision ID: jelmer@canonical.com-20110921142802-7ggkc204igsy532w
MergeĀ lp:launchpad

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
                 status=None, datecreated=None, security_related=False,
102
102
                 private=False, subscribers=(),
103
103
                 tags=None, subscribe_owner=True, filed_by=None,
104
 
                 importance=None, milestone=None, assignee=None):
 
104
                 importance=None, milestone=None, assignee=None, cve=None):
105
105
        self.owner = owner
106
106
        self.title = title
107
107
        self.comment = comment
121
121
        self.importance = importance
122
122
        self.milestone = milestone
123
123
        self.assignee = assignee
 
124
        self.cve = cve
124
125
 
125
126
    def setBugTarget(self, product=None, distribution=None,
126
127
                     sourcepackagename=None):
849
850
 
850
851
    @mutator_for(security_related)
851
852
    @operation_parameters(security_related=copy_field(security_related))
852
 
    @call_with(who=REQUEST_USER)
853
853
    @export_write_operation()
854
 
    def setSecurityRelated(security_related, who):
 
854
    def setSecurityRelated(security_related):
855
855
        """Set bug security.
856
856
 
857
857
            :security_related: True/False.
858
 
            :who: The IPerson who is making the change.
859
858
 
860
859
        This may also cause the security contact to be subscribed
861
860
        if one is registered and if the bug is not private.
863
862
        Return True if a change is made, False otherwise.
864
863
        """
865
864
 
866
 
    @operation_parameters(
867
 
        private=copy_field(private),
868
 
        security_related=copy_field(security_related),
869
 
        )
870
 
    @call_with(who=REQUEST_USER)
871
 
    @export_write_operation()
872
 
    @operation_for_version("devel")
873
 
    def setPrivacyAndSecurityRelated(private, security_related, who):
874
 
        """Set bug privacy and security .
875
 
 
876
 
            :private: True/False.
877
 
            :security_related: True/False.
878
 
            :who: The IPerson who is making the change.
879
 
 
880
 
        Return (private_changed, security_related_changed) tuple.
881
 
        """
882
 
 
883
865
    def getBugTask(target):
884
866
        """Return the bugtask with the specified target.
885
867
 
1143
1125
        the given bug tracker and remote bug id.
1144
1126
        """
1145
1127
 
1146
 
    def createBug(bug_params):
 
1128
    def createBug(bug_params, notify_event=True):
1147
1129
        """Create a bug and return it.
1148
1130
 
1149
 
        :bug_params: A CreateBugParams object.
 
1131
        :param bug_params: A CreateBugParams object.
 
1132
        :param notify_event: notify subscribers of the bug creation event.
 
1133
        :return: the new bug, or a tuple of bug, event when notify_event
 
1134
            is false.
1150
1135
 
1151
1136
        Things to note when using this factory:
1152
1137