diff --git a/company/templates/company/company_manage_bugs.html b/company/templates/company/company_manage_bugs.html index 86c9990c5..376ba2cc8 100644 --- a/company/templates/company/company_manage_bugs.html +++ b/company/templates/company/company_manage_bugs.html @@ -18,9 +18,67 @@ -
-
-

Manage Bugs

+
+
+

Manage Bugs

+
+ + + +
+
+
+
+ + + + + + + + + + + + + {% if issues %} + {% for issue in issues %} + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} + +
+
+

Bugs

+
+
DescriptionCreated OnBug TypeStatus + View +
+ {{ issue.description|slice:":25" }}... + {{ issue.created|date:"F j, Y" }}{{ issue.get_label_display }} + {% if issue.status == 'open' %} + Open + {% else %} + Closed + {% endif %} + + View +
No Issues Found
+
{% endblock body %} diff --git a/company/views.py b/company/views.py index 4ffb88c94..cef6c150f 100644 --- a/company/views.py +++ b/company/views.py @@ -365,10 +365,19 @@ def get(self, request, id, *args, **kwargs): .distinct() ) + company_obj = Company.objects.filter(id=id).first() + + # get all domains of this company + domains = Domain.objects.filter(company_id=id) + + # get all issues where the url is in the domains in descending order + issues = Issue.objects.filter(domain__in=domains).order_by("-created") + context = { "company": id, "companies": companies, - "company_obj": Company.objects.filter(id=id).first(), + "company_obj": company_obj, + "issues": issues, } return render(request, "company/company_manage_bugs.html", context=context)