Exemplo n.º 1
0
 def unlinkSprint(self, sprint):
     """See ISpecification."""
     from lp.blueprints.model.sprintspecification import (
         SprintSpecification)
     for sprint_link in self.sprint_links:
         # sprints have unique names
         if sprint_link.sprint.name == sprint.name:
             SprintSpecification.delete(sprint_link.id)
             return sprint_link
Exemplo n.º 2
0
 def unlinkSprint(self, sprint):
     """See ISpecification."""
     from lp.blueprints.model.sprintspecification import (
         SprintSpecification)
     for sprint_link in self.sprint_links:
         # sprints have unique names
         if sprint_link.sprint.name == sprint.name:
             SprintSpecification.delete(sprint_link.id)
             return sprint_link
Exemplo n.º 3
0
 def linkSprint(self, sprint, user):
     """See ISpecification."""
     from lp.blueprints.model.sprintspecification import (
         SprintSpecification)
     for sprint_link in self.sprint_links:
         # sprints have unique names
         if sprint_link.sprint.name == sprint.name:
             return sprint_link
     sprint_link = SprintSpecification(specification=self,
         sprint=sprint, registrant=user)
     if sprint.isDriver(user):
         sprint_link.acceptBy(user)
     return sprint_link
Exemplo n.º 4
0
 def linkSprint(self, sprint, user):
     """See ISpecification."""
     from lp.blueprints.model.sprintspecification import (
         SprintSpecification)
     for sprint_link in self.sprint_links:
         # sprints have unique names
         if sprint_link.sprint.name == sprint.name:
             return sprint_link
     sprint_link = SprintSpecification(specification=self,
         sprint=sprint, registrant=user)
     if sprint.isDriver(user):
         sprint_link.acceptBy(user)
     return sprint_link
Exemplo n.º 5
0
    def getSpecificationLink(self, speclink_id):
        """See `ISprint`.

        NB: we expose the horrible speclink.id because there is no unique
        way to refer to a specification outside of a product or distro
        context. Here we are a sprint that could cover many products and/or
        distros.
        """
        speclink = SprintSpecification.get(speclink_id)
        assert (speclink.sprint.id == self.id)
        return speclink
Exemplo n.º 6
0
    def getSpecificationLink(self, speclink_id):
        """See `ISprint`.

        NB: we expose the horrible speclink.id because there is no unique
        way to refer to a specification outside of a product or distro
        context. Here we are a sprint that could cover many products and/or
        distros.
        """
        speclink = SprintSpecification.get(speclink_id)
        assert (speclink.sprint.id == self.id)
        return speclink
Exemplo n.º 7
0
 def unlinkSpecification(self, spec):
     """See `ISprint`."""
     for speclink in self.spec_links:
         if speclink.spec.id == spec.id:
             SprintSpecification.delete(speclink.id)
             return speclink
Exemplo n.º 8
0
 def unlinkSpecification(self, spec):
     """See `ISprint`."""
     for speclink in self.spec_links:
         if speclink.spec.id == spec.id:
             SprintSpecification.delete(speclink.id)
             return speclink
Exemplo n.º 9
0
 def linkSpecification(self, spec):
     """See `ISprint`."""
     for speclink in self.spec_links:
         if speclink.spec.id == spec.id:
             return speclink
     return SprintSpecification(sprint=self, specification=spec)