04/06 implement creating ticket on behalf of another user for IT staff
This commit is contained in:
@@ -117,6 +117,12 @@ class Ticket(db.Model):
|
||||
internal_notes = db.Column(db.Text)
|
||||
resolution_notes = db.Column(db.Text)
|
||||
|
||||
# When an IT staff member creates a ticket on behalf of an employee
|
||||
# (e.g. from a phone call or email), this column records who filed it.
|
||||
# NULL means the ticket was self-submitted by the employee.
|
||||
created_by_staff_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=True)
|
||||
filed_by_staff = db.relationship('User', foreign_keys='Ticket.created_by_staff_id')
|
||||
|
||||
# Relationships
|
||||
comments = db.relationship('Comment', backref='ticket', lazy='dynamic', cascade='all, delete-orphan')
|
||||
attachments = db.relationship('Attachment', backref='ticket', lazy='dynamic', cascade='all, delete-orphan')
|
||||
|
||||
Reference in New Issue
Block a user