Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Nov 7, 2023
2 parents 7b74dd1 + b3ab5d8 commit 6540bb4
Show file tree
Hide file tree
Showing 56 changed files with 1,957 additions and 738 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
django-version:
- '3.2'
- '3.0'
- '4.0'
- '4.1'

steps:
- uses: actions/checkout@v2
Expand All @@ -38,7 +37,6 @@ jobs:
python -m pip install --upgrade pip
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# python -m pip install --upgrade tox tox-gh-actions
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
863 changes: 661 additions & 202 deletions LICENSE

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
![Build status](https://travis-ci.org/UniversitaDellaCalabria/uniTicket.svg?branch=master)
![Python version](https://img.shields.io/badge/license-Apache%202-blue.svg)
![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)
![Codecov](https://codecov.io/gh/UniversitadellaCalabria/uniTicket/branch/master/graph/badge.svg)
![License](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue.svg)
![Python version](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue.svg)


uniTicket
Expand Down
27 changes: 13 additions & 14 deletions publiccode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# metadata file that makes public software easily discoverable.
# More info at https://github.com/italia/publiccode.yml

publiccodeYmlVersion: '0.2'
publiccodeYmlVersion: '0.3'
categories:
- collaboration
- customer-service-and-support
Expand Down Expand Up @@ -57,7 +57,6 @@ description:
lato server dei dati;
- Template grafico Bootstrap Italia (Linee Guida di Design pe la P.A.);
- Integazione SAML2 SSO (pySAML2);
genericName: applicazione web
longDescription: >
Django **Unified Ticket System** è un sistema software di ticketing ed
helpdesk per il tracciamento e la digitalizzazione dei flussi di richieste
Expand Down Expand Up @@ -104,23 +103,23 @@ description:
- Integazione SAML2 SSO (pySAML2);
screenshots:
- >-
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/data/gallery/uniticket.png
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/gallery/uniticket.png
- >-
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/data/gallery/dashboard1.png
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/gallery/dashboard1.png
- >-
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/data/gallery/operator_takes_ticket1.png
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/gallery/operator_takes_ticket1.png
- >-
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/data/gallery/manager_dashboard1.png
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/gallery/manager_dashboard1.png
- >-
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/data/gallery/ticket_competence1.png
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/gallery/ticket_competence1.png
- >-
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/data/gallery/ticket_dependence1.png
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/gallery/ticket_dependence1.png
- >-
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/data/gallery/category_new1.png
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/gallery/category_new1.png
- >-
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/data/gallery/category_detail1.png
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/gallery/category_detail1.png
- >-
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/data/gallery/category_input_module_detail1.png
https://github.com/UniversitaDellaCalabria/uniTicket/blob/master/gallery/category_input_module_detail1.png
shortDescription: >-
Django Ticket System per il tracciamento e la digitalizzazione dei flussi
di richieste e documentali.
Expand All @@ -146,7 +145,7 @@ landingURL: 'https://github.com/UniversitaDellaCalabria/uniTicket'
legal:
authorsFile: >-
https://raw.githubusercontent.com/UniversitaDellaCalabria/uniTicket/master/AUTHORS
license: Apache-2.0
license: AGPL-3.0-or-later
mainCopyrightOwner: Università della Calabria
localisation:
availableLanguages:
Expand All @@ -164,10 +163,10 @@ name: uniTicket
platforms:
- linux
- web
releaseDate: '2023-02-21'
releaseDate: '2023-11-07'
roadmap: 'https://github.com/UniversitaDellaCalabria/uniTicket/issues'
softwareType: standalone/web
softwareVersion: v2.4.1
softwareVersion: v2.5.0
url: 'https://github.com/UniversitaDellaCalabria/uniTicket'
usedBy:
- Università della Calabria - https://www.unical.it
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Django>=3.2.19,<4
Django>=3.2.19,<5

django-admin-search-builder>=0.2.0
git+https://github.com/UniversitaDellaCalabria/django-admin-search-builder.git
django_ckeditor>=5.9.0

django-form-builder>=0.16.14
django-form-builder>=1.0.1

django-nested-admin>=3.2.4

Expand Down
21 changes: 0 additions & 21 deletions tox.ini

This file was deleted.

2 changes: 1 addition & 1 deletion uniticket/accounts/admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django.contrib.auth.admin import UserAdmin

from .models import User
Expand Down
2 changes: 1 addition & 1 deletion uniticket/accounts/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext as _
from django.utils.translation import gettext_lazy as _


class User(AbstractUser):
Expand Down
2 changes: 1 addition & 1 deletion uniticket/api_rest/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from django.contrib.auth import get_user_model
from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _


def create_token(length:int = 128) -> str:
Expand Down
5 changes: 3 additions & 2 deletions uniticket/api_rest/tests/test_02_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def setUp(self):
"organizational_office": self.office,
"date_start": None,
"date_end": None,
"created": "2020-05-08T09:30:02.759000+02:00",
"modified": "2022-04-11T13:02:23.178085+02:00",
"created": "2020-05-08T09:30:02.759000+00:00",
"modified": "2022-04-11T13:02:23.178085+00:00",
"name": "Modello di richiesta di test",
"slug": "modello-di-richiesta-di-test",
"description": "Descrizione del modulo e delle sue finalità",
Expand Down Expand Up @@ -103,6 +103,7 @@ def setUp(self):
# I close the first 10
ticket.created = timezone.localtime() - timezone.timedelta(hours=i*10)
ticket.add_competence(office=self.office, user=self.staff_2)

ticket.close(user=self.op1, motivazione = f"motivazione {i}")
ticket.closed_by = self.op1
ticket.closed_date = timezone.localtime() + timezone.timedelta(hours=1)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 4.2.5 on 2023-10-13 07:25

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
(
"organizational_area",
"0001_squashed_0032_organizationalstructureoffice_is_private",
),
]

operations = [
migrations.AddIndex(
model_name="organizationalstructureoffice",
index=models.Index(
fields=["is_active", "organizational_structure_id"],
name="organizatio_is_acti_351a28_idx",
),
),
]
1 change: 1 addition & 0 deletions uniticket/organizational_area/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ class OrganizationalStructureOffice(models.Model):
class Meta:
unique_together = ('slug', 'organizational_structure')
ordering = ['name']
indexes = [models.Index(fields=["is_active", "organizational_structure_id"])]
verbose_name = _("Organizational Structure Office")
verbose_name_plural = _("Organizational Structure Offices")

Expand Down
3 changes: 2 additions & 1 deletion uniticket/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
# https://docs.djangoproject.com/en/2.1/topics/i18n/

LANGUAGE_CODE = 'en'
TIME_ZONE = 'Europe/Rome'
# TIME_ZONE = 'Europe/Rome'
TIME_ZONE = 'GMT'
USE_I18N = True
USE_L10N = True
USE_TZ = True
Expand Down
4 changes: 2 additions & 2 deletions uniticket/tests/test_03_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ def test_add_office_operator(self):
self.office_1_str_1.refresh_from_db()

# Add office operator
new_params = {'operatore': self.user_1.pk,
new_params = {'user': self.user_1.pk,
'description': 'operatore'}
response = self.client.post(reverse('uni_ticket:manager_office_detail',
response = self.client.post(reverse('uni_ticket:manager_add_office_operator',
kwargs={'structure_slug': self.structure_1.slug,
'office_slug': self.office_1_str_1.slug}),
new_params,
Expand Down
6 changes: 6 additions & 0 deletions uniticket/titulus_ws/protocollo.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
import os
import xml.etree.ElementTree as ET

Expand All @@ -10,6 +11,9 @@
from zeep.transports import Transport


logger = logging.getLogger(__name__)


class WSTitulusClient(object):
"""
"""
Expand All @@ -29,6 +33,8 @@ def __init__(self,

self.doc = self.template_xml_flusso.format(**kwargs)

logger.info(f"Protocollazione Titulus {self.doc}")

# RPA username and code
# (per impersonificare RPA in fascicolazione!)
self.rpa_username = kwargs.get('destinatario_username')
Expand Down
8 changes: 3 additions & 5 deletions uniticket/uni_ticket/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,10 @@ def new_func(*original_args, **original_kwargs):
structure = get_object_or_404(
OrganizationalStructure, slug=structure_slug, is_active=True
)

if user_is_manager(request.user, structure):
return custom_message(
request,
_("Accesso da operatore non consentito." " Sei un manager."),
structure_slug=structure_slug,
)
return redirect("uni_ticket:manager_dashboard", structure_slug=structure_slug)

oe = user_is_operator(request.user, structure)
if oe:
original_kwargs["office_employee"] = oe
Expand Down
Loading

0 comments on commit 6540bb4

Please sign in to comment.