Exemplo n.º 1
0
def notify_users_of_new_support_assignation(sender, instance, created, *args,
                                            **kwargs):
    """
    Notifies an user that has been assigned to an new Support Working Day
    """
    if created:
        notify_item_assignation_to_user(
            instance, "user", "te ha asignado la jornada de soporte")
Exemplo n.º 2
0
def notify_users_of_new_sprint_assignation(sender, instance, created, *args,
                                           **kwargs):
    """
    Notifies an user that has been assigned to a new Sprint
    """
    if created:
        notify_item_assignation_to_user(
            instance, "accountable_user",
            "te ha designado como responsable del sprint")
Exemplo n.º 3
0
def notify_users_of_existing_sprint_assignation(sender, instance, *args,
                                                **kwargs):
    """
    Notifies an user that has been assigned to an existing Sprint
    """
    if instance.persisted:
        old_instance = Sprint.objects.get(pk=instance.id)
        notify_item_assignation_to_user(
            instance, "accountable_user",
            "te ha designado como responsable del sprint", old_instance)
Exemplo n.º 4
0
def notify_users_of_existing_support_assignation(sender, instance, *args,
                                                 **kwargs):
    """
    Notifies an user that has been assigned to an existing Support Working Day
    """
    if instance.persisted:
        old_instance = SupportWorkingDay.objects.get(pk=instance.id)
        notify_item_assignation_to_user(
            instance, "user", "te ha asignado la jornada de soporte",
            old_instance)
Exemplo n.º 5
0
def notify_users_of_new_green_assignation(sender, instance, created, *args,
                                          **kwargs):
    """
    Notifies users that they have been assigned to an new Green Working Day
    """
    if created:
        notify_item_assignation_to_user(
            instance, "main_user",
            "te ha asignado, con rol principal, la jornada especial")
        notify_item_assignation_to_user(
            instance, "support_user",
            "te ha asignado, con rol de soporte, la jornada especial")
Exemplo n.º 6
0
def notify_users_of_existing_green_assignation(sender, instance, *args,
                                               **kwargs):
    """
    Notifies users that they have been assigned to an existing Green Working Day
    """
    if instance.persisted:
        old_instance = GreenWorkingDay.objects.get(pk=instance.id)
        notify_item_assignation_to_user(
            instance, "main_user",
            "te ha asignado, con rol principal, la jornada especial",
            old_instance)
        notify_item_assignation_to_user(
            instance, "support_user",
            "te ha asignado, con rol de soporte, la jornada especial",
            old_instance)
Exemplo n.º 7
0
def notify_users_of_existing_user_story_assignation(sender, instance, raw,
                                                    using, update_fields,
                                                    *args, **kwargs):
    """
    Notifies users that they have been assigned to an existing User Story
    """
    if not update_fields and instance.persisted:
        old_instance = UserStory.objects.get(pk=instance.id)
        message = "te ha designado como {role} de la historia de usuario"
        development_user = notify_item_assignation_to_user(
            instance, "development_user", message.format(role="desarrollador"),
            old_instance)
        validation_user = notify_item_assignation_to_user(
            instance, "validation_user", message.format(role="validador"),
            old_instance)
        support_user = notify_item_assignation_to_user(
            instance, "support_user", message.format(role="soporte"),
            old_instance)
        instance.change_notification_excluded_users = [
            development_user, validation_user, support_user
        ]
Exemplo n.º 8
0
def notify_users_of_new_user_story_assignation(sender, instance, created, raw,
                                               using, update_fields, *args,
                                               **kwargs):
    """
    Notifies users that they have been assigned to a new User Story
    """
    if created and not update_fields:
        message = "te ha designado como {role} de la historia de usuario"
        notify_item_assignation_to_user(instance, "development_user",
                                        message.format(role="desarrollador"))
        notify_item_assignation_to_user(instance, "validation_user",
                                        message.format(role="validador"))
        notify_item_assignation_to_user(instance, "support_user",
                                        message.format(role="soporte"))