Skip to content
Commits on Source (5)
......@@ -6,6 +6,15 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog`_,
and this project adheres to `Semantic Versioning`_.
`2.0rc3`_ - 2021-08-17
----------------------
Fixed
~~~~~
* Get next properties in issue form not by the non-unique category name but
by the unique id.
`2.0rc2`_ - 2021-06-26
----------------------
......@@ -75,3 +84,4 @@ Added
.. _2.0b1: https://edugit.org/AlekSIS/Official/AlekSIS-App-Hjelp/-/tags/2.0b1
.. _2.0rc1: https://edugit.org/AlekSIS/Official/AlekSIS-App-Hjelp/-/tags/2.0rc1
.. _2.0rc2: https://edugit.org/AlekSIS/Official/AlekSIS-App-Hjelp/-/tags/2.0rc2
.. _2.0rc3: https://edugit.org/AlekSIS/Official/AlekSIS-App-Hjelp/-/tags/2.0rc3
......@@ -98,11 +98,11 @@
$(id).disabled = true;
}
$.fn.setNextProperties = function (field_id, next_field_id, next_field_name) {
var category = $('#' + field_id).find(':selected').text();
var id = $('#' + field_id).find(':selected').val();
$.ajax({
url: '{% url "issues_get_next_properties" %}',
data: {
'category': category
'id': id
},
dataType: 'json',
success: function (data) {
......
......@@ -4,7 +4,7 @@ from django.contrib import messages
from django.contrib.auth.mixins import PermissionRequiredMixin as GlobalPermissionRequiredMixin
from django.forms.forms import BaseForm
from django.http import HttpResponse, JsonResponse
from django.shortcuts import redirect, render
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse_lazy
from django.utils.translation import gettext_lazy as _
from django.views.decorators.cache import never_cache
......@@ -185,12 +185,13 @@ def add_arrows(array: list):
@never_cache
def issues_get_next_properties(request):
category = request.GET.get("category", None)
_id = request.GET.get("id", None)
issue_category = get_object_or_404(IssueCategory, id=_id)
next_properties = {
"icon": IssueCategory.objects.get(name=category).icon,
"free_text": IssueCategory.objects.get(name=category).free_text,
"placeholder": IssueCategory.objects.get(name=category).placeholder,
"has_children": IssueCategory.objects.get(name=category).children.exists(),
"icon": issue_category.icon,
"free_text": issue_category.free_text,
"placeholder": issue_category.placeholder,
"has_children": issue_category.children.exists(),
}
return JsonResponse(next_properties)
......
This diff is collapsed.
[tool.poetry]
name = "AlekSIS-App-Hjelp"
version = "2.0rc2"
version = "2.0rc3"
packages = [
{ include = "aleksis" }
]
......