diff --git a/.forgejo/workflows/deploy_staging.yml b/.forgejo/workflows/deploy_staging.yml
index 3b44d24..0dccd66 100644
--- a/.forgejo/workflows/deploy_staging.yml
+++ b/.forgejo/workflows/deploy_staging.yml
@@ -20,9 +20,12 @@ jobs:
- name: Run django tests
working-directory: core
run: python3 manage.py test
+ - name: Run django coverage
+ working-directory: core
+ run: coverage manage.py test
deploy:
- needs: [test]
+ needs: [ test ]
runs-on: docker
steps:
- uses: actions/checkout@v4
diff --git a/core/inventory/migrations/0009_comment.py b/core/inventory/migrations/0009_comment.py
new file mode 100644
index 0000000..0a5f720
--- /dev/null
+++ b/core/inventory/migrations/0009_comment.py
@@ -0,0 +1,23 @@
+# Generated by Django 4.2.7 on 2024-11-22 22:02
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('inventory', '0008_alter_item_event_alter_itemplacement_container_and_more'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Comment',
+ fields=[
+ ('id', models.AutoField(primary_key=True, serialize=False)),
+ ('comment', models.TextField()),
+ ('timestamp', models.DateTimeField(auto_now_add=True)),
+ ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='inventory.item')),
+ ],
+ ),
+ ]
diff --git a/core/inventory/models.py b/core/inventory/models.py
index 46a38f0..fbbe0a9 100644
--- a/core/inventory/models.py
+++ b/core/inventory/models.py
@@ -1,7 +1,6 @@
from itertools import groupby
-from django.core.files.base import ContentFile
-from django.db import models, IntegrityError
+from django.db import models
from django_softdelete.models import SoftDeleteModel, SoftDeleteManager
diff --git a/core/mail/migrations/0007_alter_eventaddress_address.py b/core/mail/migrations/0007_alter_eventaddress_address.py
index 7b979a5..5d71449 100644
--- a/core/mail/migrations/0007_alter_eventaddress_address.py
+++ b/core/mail/migrations/0007_alter_eventaddress_address.py
@@ -1,4 +1,4 @@
-# Generated by Django 4.2.7 on 2024-11-18 01:50
+# Generated by Django 4.2.7 on 2024-11-22 18:57
from django.db import migrations, models
diff --git a/core/tickets/tests/v2/test_tickets.py b/core/tickets/tests/v2/test_tickets.py
index d2101b5..8f72392 100644
--- a/core/tickets/tests/v2/test_tickets.py
+++ b/core/tickets/tests/v2/test_tickets.py
@@ -117,6 +117,7 @@ class IssueApiTest(TestCase):
self.assertEqual(response.json()[0]['timeline'][5]['item']['description'], "foo")
self.assertEqual(response.json()[0]['timeline'][5]['item']['event'], "evt")
self.assertEqual(response.json()[0]['timeline'][5]['item']['box'], "box1")
+ self.assertEqual(len(response.json()[0]['related_items']), 1)
self.assertEqual(response.json()[0]['related_items'][0]['description'], "foo")
self.assertEqual(response.json()[0]['related_items'][0]['event'], "evt")
self.assertEqual(response.json()[0]['related_items'][0]['box'], "box1")
@@ -313,16 +314,6 @@ class IssueApiTest(TestCase):
content_type='application/json')
self.assertEqual(response.status_code, 400)
- # def test_post_comment(self):
- # issue = IssueThread.objects.create(
- # name="test issue",
- # )
- # response = self.client.post('/api/2/comments/', {'comment': 'test', 'issue_thread': issue.id})
- # self.assertEqual(response.status_code, 201)
- # self.assertEqual(response.json()['comment'], 'test')
- # self.assertEqual(response.json()['issue_thread'], issue.id)
- # self.assertEqual(response.json()['timestamp'], response.json()['timestamp'])
-
def test_post_comment_altenative(self):
issue = IssueThread.objects.create(
name="test issue",
diff --git a/web/src/components/EditItem.vue b/web/src/components/EditItem.vue
index 9bea6f9..833bfd5 100644
--- a/web/src/components/EditItem.vue
+++ b/web/src/components/EditItem.vue
@@ -12,13 +12,16 @@
field="description"
:validation-fn="str => str && str.length > 0"
/>
-
{{ item }}
+