Tracking footer fields in new table

27 views
Skip to first unread message

Phil Lello

unread,
Jul 11, 2014, 10:03:02 PM7/11/14
to repo-d...@googlegroups.com
Hi,

I'm working on a plugin against the 2.9-rc2 codebase. I'd like to add a new table to track footer fields and values, but for the life of me I can't see where table creation is happening.

The table I'm proposing is 'patch_footers', which will contain:

patch_set_id integer
footer_field character varying(255)
footer_value character varying(255)

My motivation is that I'd like my plugin to associate 1..N tickets from an in-house ticketing system with a change, with the ticket id tracked in the database so I can easily query all patches related to a ticket.

Can someone point me in the right direction here? It doesn't seem like Schema_XX.java is the right place to do it, as I can't see any table creation there

Phil

Edwin Kempin

unread,
Jul 12, 2014, 2:01:17 AM7/12/14
to Phil Lello, Repo and Gerrit Discussion
2014-07-12 4:03 GMT+02:00 Phil Lello <phil....@googlemail.com>:
Hi,

I'm working on a plugin against the 2.9-rc2 codebase. I'd like to add a new table to track footer fields and values,
Gerrit already knows how to track footer fields and values, see
  https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#trackingid

They are not stored in the database but in the secondary index and you can use a change query to find changes by tracking ID.
 
but for the life of me I can't see where table creation is happening.

The table I'm proposing is 'patch_footers', which will contain:

patch_set_id integer
footer_field character varying(255)
footer_value character varying(255)

My motivation is that I'd like my plugin to associate 1..N tickets from an in-house ticketing system with a change, with the ticket id tracked in the database so I can easily query all patches related to a ticket.

Can someone point me in the right direction here? It doesn't seem like Schema_XX.java is the right place to do it, as I can't see any table creation there

Phil

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Phil Lello

unread,
Jul 13, 2014, 8:30:31 AM7/13/14
to Edwin Kempin, Repo and Gerrit Discussion
Thanks Edwin, you're a star.

I've got my interface working nicely now by using the AJAX query API to get changes related to a given ticket. If I can work out how to do the config at a plugin level, possibly using a custom search prefix, that'd be gravy.

Phil
Reply all
Reply to author
Forward
0 new messages