# HG changeset patch # User Mike Becker # Date 1757857343 -7200 # Node ID 41ce87983ab5c36d34e196f107cb5ab93d97080a # Parent 7e3afd24ae769c77f2497ab36f8b79d1884fd5c3 fix incorrect diff of metadata - part 1/2 fixes #719 diff -r 7e3afd24ae76 -r 41ce87983ab5 src/main/kotlin/de/uapcore/lightpit/servlet/FeedServlet.kt --- a/src/main/kotlin/de/uapcore/lightpit/servlet/FeedServlet.kt Sun Sep 14 14:06:16 2025 +0200 +++ b/src/main/kotlin/de/uapcore/lightpit/servlet/FeedServlet.kt Sun Sep 14 15:42:23 2025 +0200 @@ -53,6 +53,7 @@ .showInlineDiffs(true) .mergeOriginalRevised(true) .inlineDiffByWord(true) + .reportLinesUnchanged(true) .oldTag { start -> if (start) "" else "" } .newTag { start -> if (start) "" else "" } .build() @@ -80,17 +81,18 @@ ) private fun fullContent(http: HttpRequest, issue: IssueHistoryEntry) = IssueDiff( + // Note: we must make sure that every entry is non-empty, otherwise the diff generator will produce wrong results id = issue.issueid, project = issue.project, - component = issue.component, + component = issue.component.ifBlank { http.i18n("placeholder.null-component") }, status = http.i18n("issue.status."+issue.status.name), category = http.i18n("issue.category."+issue.category.name), subject = issue.subject, description = issue.description.replace("\r", ""), - assignee = issue.assignee, - eta = issue.eta?.let { SimpleDateFormat("dd.MM.yyyy").format(it) } ?: "", - affected = issue.affected, - resolved = issue.resolved + assignee = issue.assignee.ifBlank { http.i18n("placeholder.null-assignee") }, + eta = issue.eta?.let { SimpleDateFormat("dd.MM.yyyy").format(it) } ?: http.i18n("placeholder.null-eta"), + affected = issue.affected.ifBlank { http.i18n("placeholder.null-version") }, + resolved = issue.resolved.ifBlank { http.i18n("placeholder.null-version") } ) private fun diffContent(http: HttpRequest, cur: IssueHistoryEntry, next: IssueHistoryEntry): IssueDiff { diff -r 7e3afd24ae76 -r 41ce87983ab5 src/main/resources/localization/strings.properties --- a/src/main/resources/localization/strings.properties Sun Sep 14 14:06:16 2025 +0200 +++ b/src/main/resources/localization/strings.properties Sun Sep 14 15:42:23 2025 +0200 @@ -170,6 +170,7 @@ placeholder.null-lead=Unassigned placeholder.null-owner=Unassigned placeholder.null-version=None +placeholder.null-eta=None progress=Overall Progress project.name=Name project.owner=Project Lead diff -r 7e3afd24ae76 -r 41ce87983ab5 src/main/resources/localization/strings_de.properties --- a/src/main/resources/localization/strings_de.properties Sun Sep 14 14:06:16 2025 +0200 +++ b/src/main/resources/localization/strings_de.properties Sun Sep 14 15:42:23 2025 +0200 @@ -170,6 +170,7 @@ placeholder.null-lead=Niemand placeholder.null-owner=Nicht Zugewiesen placeholder.null-version=Keine +placeholder.null-eta=Nicht geplant progress=Gesamtfortschritt project.name=Name project.owner=Projektleitung diff -r 7e3afd24ae76 -r 41ce87983ab5 src/main/webapp/WEB-INF/changelogs/changelog-de.jspf --- a/src/main/webapp/WEB-INF/changelogs/changelog-de.jspf Sun Sep 14 14:06:16 2025 +0200 +++ b/src/main/webapp/WEB-INF/changelogs/changelog-de.jspf Sun Sep 14 15:42:23 2025 +0200 @@ -35,6 +35,7 @@
  • Vorgänge können nun auch direkt über die Vorgangsnummer (anstatt Raute + Nummer) verlinkt werden.
  • Die Vorschläge in den Suchfeldern für Vorgänge sind nun absteigend nach Vorgangsnummer sortiert.
  • Die Standardkategorie für neue Vorgänge in veröffentlichten Versionen ist nun "Fehler" anstelle von "Feature".
  • +
  • Fehlerhafte Delta-Anzeige in RSS-Feeds behoben.
  • Vorgänge können nicht länger mit sich selbst verlinkt werden.
  • Fehler in der Deutschen Übersetzung behoben.
  • diff -r 7e3afd24ae76 -r 41ce87983ab5 src/main/webapp/WEB-INF/changelogs/changelog.jspf --- a/src/main/webapp/WEB-INF/changelogs/changelog.jspf Sun Sep 14 14:06:16 2025 +0200 +++ b/src/main/webapp/WEB-INF/changelogs/changelog.jspf Sun Sep 14 15:42:23 2025 +0200 @@ -35,6 +35,7 @@
  • Change that you can now relate issues by just submitting their number (instead of hash + number).
  • Change that issues suggested by the search boxes are now sorted by ID in descending order.
  • Change that the default category for new issues in released versions is Bug instead of Feature.
  • +
  • Fix wrong diffs in RSS feed.
  • Fix that issues could relate to themselves.
  • Fix errors in the German translation.
  • diff -r 7e3afd24ae76 -r 41ce87983ab5 src/main/webapp/WEB-INF/jsp/issue-view.jsp --- a/src/main/webapp/WEB-INF/jsp/issue-view.jsp Sun Sep 14 14:06:16 2025 +0200 +++ b/src/main/webapp/WEB-INF/jsp/issue-view.jsp Sun Sep 14 15:42:23 2025 +0200 @@ -169,7 +169,14 @@ - + + + + + + + +