<commit_before>#! usr/bin/python3
# -*- coding: utf-8 -*-
#
# Flicket - copyright <NAME>: <EMAIL>

import datetime

from flask import flash, g

from application import db
from application.flicket.models.flicket_models import FlicketAction


def add_action(action=None, ticket=None, recipient=None):
    # todo: add action to state if user has changed ticket status.

    """
    :param recipient:
    :param action: string 'assign', 'unassign', 'close', 'claim', 'release'
    :param ticket: ticket object 
    :return:
    """
    ticket_id = None
    post_id = None
    assigned = None
    claimed = None
    released = None
    closed = None
    opened = None
    status = None
    priority = None

    if len(ticket.posts) == 0:
        ticket_id = ticket.id
    else:
        post_id = ticket.posts[len(ticket.posts) - 1].id<commit_msg>remove done todo<commit_after>#! usr/bin/python3
# -*- coding: utf-8 -*-
#
# Flicket - copyright <NAME>: <EMAIL>

import datetime

from flask import flash, g

from application import db
from application.flicket.models.flicket_models import FlicketAction


def add_action(action=None, ticket=None, recipient=None):

    """
    :param recipient:
    :param action: string 'assign', 'unassign', 'close', 'claim', 'release'
    :param ticket: ticket object 
    :return:
    """
    ticket_id = None
    post_id = None
    assigned = None
    claimed = None
    released = None
    closed = None
    opened = None
    status = None
    priority = None

    if len(ticket.posts) == 0:
        ticket_id = ticket.id
    else:
        post_id = ticket.posts[len(ticket.posts) - 1].id
{'fraction_non_alphanumeric': 0.11433868974042027, 'fraction_numerical': 0.004944375772558714, 'mean_word_length': 2.891826923076923, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1362922', 'n_tokens_mistral': 519, 'n_tokens_neox': 502, 'n_words': 150}