]> source.dussan.org Git - gitea.git/commitdiff
fix: {show,link to} proper PR on kanban board ref (#15004)
authorwULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf <61180606+wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf@users.noreply.github.com>
Tue, 16 Mar 2021 15:42:25 +0000 (16:42 +0100)
committerGitHub <noreply@github.com>
Tue, 16 Mar 2021 15:42:25 +0000 (15:42 +0000)
the issue was that PR references in kanban boards were being generated
using `.ID` instead of `.Index`, which led to constructing incorrect
links to possibly non-existent {PR,issue}s and following that to showing
nonsensical values in the boards.

kudos also go to @zeripath for pointing at the file to fix.

Signed-off-by: wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf <a_mirre@utb.cz>
Co-authored-by: zeripath <art27@cantab.net>
templates/repo/projects/view.tmpl

index de1fc37b03fa49e0a5b82d9e748de9319a7b8cfa..1d4a26837e6e1cf55aa7e87bf05e32908b09bd54 100644 (file)
                                                        {{- end }}
                                                        {{- range index $.LinkedPRs .ID }}
                                                        <div class="meta">
-                                                               <a href="{{$.RepoLink}}/pulls/{{ .ID }}">
+                                                               <a href="{{$.RepoLink}}/pulls/{{ .Index }}">
                                                                        <span class="{{if .PullRequest.HasMerged}}purple{{else if .IsClosed}}red{{else}}green{{end}}">{{svg "octicon-git-merge"}}</span>
-                                                                       {{ .Title}} (#{{ .ID }})
+                                                                       {{ .Title}} (#{{ .Index }})
                                                                </a>
                                                        </div>
                                                        {{- end }}