Skip to content

Commit d4146d4

Browse files
committed
fix: Always export superseded-by as an array of relations
Thanks to Morgan Smith <Morgan.J.Smith@outlook.com> for raising this issue.
1 parent 1fc1e1a commit d4146d4

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

scripts/bone-export.clj

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,6 @@
699699
arch (archive-url report email source-map)
700700
src-type (get-in source-map [source-name :source-type])
701701
relations (group-relations report src-type)
702-
;; First :supersedes outgoing (kept as a singular convenience field)
703-
first-sup (first (:supersedes relations))
704702
role (sender-role from source-name source-map maintainers-map)
705703
awaiting? (awaiting-reply? report source-name source-map maintainers-map)]
706704
(-> {:type (name (:report/type report))
@@ -730,14 +728,6 @@
730728
awaiting? (assoc :awaiting true)
731729
(:report/expiry-value report) (assoc :expiry (format-date-iso (:report/expiry-value report)))
732730
(:report/close-reason report) (assoc :close-reason (name (:report/close-reason report)))
733-
;; Singular :superseded-by convenience field -- first outgoing
734-
;; :supersedes if any. Subject is also exposed under
735-
;; :rel/to.{:report/email :email/subject}.
736-
first-sup
737-
(assoc :superseded-by
738-
(cond-> {:message-id (:message-id first-sup)}
739-
(get-in first-sup [:subject])
740-
(assoc :subject (:subject first-sup))))
741731
(and (= :expired (:report/close-reason report))
742732
(:email/date-sent (:report/closed report)))
743733
(assoc :expired-date (format-date-iso (:email/date-sent (:report/closed report)))))

0 commit comments

Comments
 (0)