~sircmpwn/todo.sr.ht/#18: Add ticket labels

Status
RESOLVED IMPLEMENTED
Submitter
~sircmpwn
Submitted
1 year, 2 months ago
Updated
a month ago
User Agent
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.9.1 Chrome/56.0.2924.122 Safari/537.36
Labels
No labels applied.

~grayhatter 5 months ago

something like?

class TicketLabel(Base):
    __tablename__ = 'ticket_label'
    id = sa.Column(sa.Integer, primary_key=True)
    created = sa.Column(sa.DateTime, nullable=False)
    updated = sa.Column(sa.DateTime, nullable=False)

    label_id = sa.Column(sa.Integer, sa.ForeignKey('label.id'))
    tracker_id = sa.Column(sa.Integer, sa.ForeignKey('tracker.id'))
    ticket_id = sa.Column(sa.Integer, sa.ForeignKey('ticket.id'))
   user_id  = sa.Column(sa.Integer, sa.ForeignKey('user.id'))

    __table_args__ = (sa.UniqueConstraint('label_id', 'ticket_id', name='_label_ticket_uc'),)


class Label(Base):
    __tablename__ = 'label'
    id = sa.Column(sa.Integer, primary_key=True)
    created = sa.Column(sa.DateTime, nullable=False)
    updated = sa.Column(sa.DateTime, nullable=False)

   tracker_id = sa.Column(sa.Integer, sa.ForeignKey('tracker.id'), primary_key=True)
   name = sa.Column(sa.Text)
   color = sa.Column(sa.Text)

or are there other things you want to include as well?

~sircmpwn 5 months ago

That looks about right imo.

~ihabunek a month ago

This is resolved.

~sircmpwn a month ago

REPORTED RESOLVED IMPLEMENTED