add in_project query parameter to global issue view - fixes #574 default tip

Mon, 13 Jan 2025 21:38:06 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 13 Jan 2025 21:38:06 +0100
changeset 343
5fa3e40d0de0
parent 342
50d94c216c3f

add in_project query parameter to global issue view - fixes #574

src/main/kotlin/de/uapcore/lightpit/servlet/IssuesServlet.kt file | annotate | diff | comparison | revisions
src/main/webapp/WEB-INF/changelogs/changelog-de.jspf file | annotate | diff | comparison | revisions
src/main/webapp/WEB-INF/changelogs/changelog.jspf file | annotate | diff | comparison | revisions
--- a/src/main/kotlin/de/uapcore/lightpit/servlet/IssuesServlet.kt	Mon Jan 13 20:57:40 2025 +0100
+++ b/src/main/kotlin/de/uapcore/lightpit/servlet/IssuesServlet.kt	Mon Jan 13 21:38:06 2025 +0100
@@ -48,6 +48,10 @@
             http.response.sendError(404)
             return
         }
+        if (http.param("in_project") != null) {
+            http.response.sendRedirect("${http.baseHref}projects/${issue.project.node}/issues/-/-/${issue.id}")
+            return
+        }
         renderIssueView(http, dao, issue, pathInfos)
     }
 
@@ -57,6 +61,10 @@
             http.response.sendError(404)
             return
         }
+        if (http.param("in_project") != null) {
+            http.response.sendRedirect("${http.baseHref}projects/${issue.project.node}/issues/-/-/${issue.id}/edit")
+            return
+        }
 
         with(http) {
             view = IssueEditView(
--- a/src/main/webapp/WEB-INF/changelogs/changelog-de.jspf	Mon Jan 13 20:57:40 2025 +0100
+++ b/src/main/webapp/WEB-INF/changelogs/changelog-de.jspf	Mon Jan 13 21:38:06 2025 +0100
@@ -28,6 +28,10 @@
 
 <ul>
     <li>Projekt und Komponente sind nun in der Vorgangsansicht direkt verlinkt.</li>
+    <li>
+        Query Parameter <code>in_project</code> zu globalen Vorgangs-URLs hinzugefügt,
+        der von Tools benutzt werden kann, um Vorgänge direkt in der Projektansicht zu öffnen.
+    </li>
     <li>Versionsinformationen werden nun korrekt in die Vorgangshistorie geschrieben (relevant für RSS-Feeds).</li>
     <li>
         Fehler behoben, bei dem die Formulare für Versionen und Vorgänge existierende Datumsfelder mit dem
--- a/src/main/webapp/WEB-INF/changelogs/changelog.jspf	Mon Jan 13 20:57:40 2025 +0100
+++ b/src/main/webapp/WEB-INF/changelogs/changelog.jspf	Mon Jan 13 21:38:06 2025 +0100
@@ -29,6 +29,10 @@
 <ul>
     <li>Add links to project and component in the tabular issue view.</li>
     <li>
+        Add optional query parameter <code>in_project</code> for global issue URLs
+        that can be used by tools to directly open an issue in the project view.
+    </li>
+    <li>
         Fix missing affected and target versions in issue history
         (which is why they were never shown in the RSS feed).
     </li>

mercurial