Thanks David, that is what I expected too. The extension code I have is:
from reviewboard.extensions.base import Extension from reviewboard.extensions.hooks import ReviewRequestFieldsHook from reviewboard.reviews.fields import BaseReviewRequestField class PackageMetadataField(BaseReviewRequestField): field_id = "package_review_metadata" label = "Packages" class TurtlePackageExtension(Extension): def initialize(self) -> None: ReviewRequestFieldsHook(self, "info", [PackageMetadataField]) Cheers, Jake On Sun, 13 Oct 2024 at 07:24, David Trowbridge <trowb...@gmail.com> wrote: > Jake, > > Having a field definition in your extension should make it so data gets > copied from the draft to the review request. Can you share what your > extension code looks like? > > David > > On Wed, Sep 25, 2024 at 7:37 AM Jake <jake....@gmail.com> wrote: > >> Hi, >> >> I am trying to record some custom metadata when uploading diffs to a >> draft review via the API, however when the draft review is published the >> extra data doesn't seem to get transferred across to the final review which >> is what I would expect. Is there something special I need to do make this >> happen? >> >> I have tried creating a simple extension which defines a custom field >> based on BaseReviewRequestField with matching ID to what is being uploaded >> via the API (using draft.update(extra_data_json={...}) from Python), in >> the hopes that the extension would be triggered to transfer the keys across. >> The custom field type just defines the field_id and label. >> Using this I can see the extra data displayed on the draft, so I am >> confident it is in the right place (and I can read it back via the API. >> >> I also came across this conversation >> <https://groups.google.com/g/reviewboard/c/aCS0Mn_PWVE/m/u2jfVoznAAAJ> >> which suggests adding the extra data directly to the review rather than >> going via the draft, however the extra data should correspond to what's in >> the diff so if the draft is discarded, the extra data should be too. >> >> Cheers, >> >> Jake >> >> -- >> Supercharge your Review Board with Power Pack: >> https://www.reviewboard.org/powerpack/ >> Want us to host Review Board for you? Check out RBCommons: >> https://rbcommons.com/ >> Happy user? Let us know! https://www.reviewboard.org/users/ >> --- >> You received this message because you are subscribed to the Google Groups >> "Review Board Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to reviewboard+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/reviewboard/3add76ca-8293-4334-ae13-269c3015eaf0n%40googlegroups.com >> <https://groups.google.com/d/msgid/reviewboard/3add76ca-8293-4334-ae13-269c3015eaf0n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > Supercharge your Review Board with Power Pack: > https://www.reviewboard.org/powerpack/ > Want us to host Review Board for you? Check out RBCommons: > https://rbcommons.com/ > Happy user? Let us know! https://www.reviewboard.org/users/ > --- > You received this message because you are subscribed to the Google Groups > "Review Board Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to reviewboard+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/reviewboard/CAFS3VNUer5ruD5gN9sbfG_siLdj0gwYs5RSwPYQDeiBB-RkrTQ%40mail.gmail.com > <https://groups.google.com/d/msgid/reviewboard/CAFS3VNUer5ruD5gN9sbfG_siLdj0gwYs5RSwPYQDeiBB-RkrTQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups "Review Board Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/CAHaOuwJ3LF-uBgokBaLuvYtjA_i74mbJAT1-LKuTAD5rQjTaqQ%40mail.gmail.com.