How to add additional co,umns to the "My Reviews" table?

273 views
Skip to first unread message

Sebastian Schuberth

unread,
Apr 16, 2015, 4:59:40 AM4/16/15
to repo-d...@googlegroups.com
Hi,

what does it take to add additional columns with arbitrary information to the "My Reviews" table? As an example, I'd image a column listing the number of comments for the latest patch set in a change.

Would that require writing a plugin, or would it be doable by some other means, like Prolog code?

Thanks,
Sebastian

Edwin Kempin

unread,
Apr 16, 2015, 8:16:35 AM4/16/15
to Sebastian Schuberth, Repo and Gerrit Discussion
You can neither do this from Prolog nor from a plugin. You would need to add support for this in Gerrit core.
 

Thanks,
Sebastian

--
--
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.

Sebastian Schuberth

unread,
Apr 16, 2015, 8:20:47 AM4/16/15
to Edwin Kempin, Repo and Gerrit Discussion
On Thu, Apr 16, 2015 at 2:16 PM, Edwin Kempin <edwin....@gmail.com> wrote:

>> Would that require writing a plugin, or would it be doable by some other
>> means, like Prolog code?
>
> You can neither do this from Prolog nor from a plugin. You would need to add
> support for this in Gerrit core.

Thanks for the reply, even though it's bad news ;-)

However, I though adding columns would be possible via Prolog as
that's what the non-author code review example [1] basically does: It
adds a "NACR" column to the table. But I guess that's a special case
as that's a new review category. Anyway, would a hack be possible that
adds a new review category that doe snot really accept reviews but
show the number of comments?

[1] https://gerrit.it.here.com/Documentation/prolog-cookbook.html#NonAuthorCodeReview

--
Sebastian Schuberth

Saša Živkov

unread,
Apr 16, 2015, 8:28:46 AM4/16/15
to Sebastian Schuberth, Edwin Kempin, Repo and Gerrit Discussion
On Thu, Apr 16, 2015 at 2:20 PM, Sebastian Schuberth <sschu...@gmail.com> wrote:
On Thu, Apr 16, 2015 at 2:16 PM, Edwin Kempin <edwin....@gmail.com> wrote:

>> Would that require writing a plugin, or would it be doable by some other
>> means, like Prolog code?
>
> You can neither do this from Prolog nor from a plugin. You would need to add
> support for this in Gerrit core.

Thanks for the reply, even though it's bad news ;-)

However, I though adding columns would be possible via Prolog as
that's what the non-author code review example [1] basically does: It
adds a "NACR" column to the table. But I guess that's a special case
as that's a new review category.
 
Yes, is is just a label and it shows Vote + User.
 
Anyway, would a hack be possible that
adds a new review category that doe snot really accept reviews but
show the number of comments?

This would be a really ugly hack as you would need to express the number of comments
as a user name. So you need users named "1 comments", "2 comments", etc... 

...

Showing the number of comments in this table is a good idea and needs to be a first class citizen
in that table, not an ugly hack.

Sebastian Schuberth

unread,
Apr 16, 2015, 8:34:11 AM4/16/15
to Saša Živkov, Edwin Kempin, Repo and Gerrit Discussion
On Thu, Apr 16, 2015 at 2:28 PM, Saša Živkov <ziv...@gmail.com> wrote:

> Showing the number of comments in this table is a good idea and needs to be
> a first class citizen
> in that table, not an ugly hack.

Agreed, and it seem there's already an issue about it [1]. However, it
probably makes more sense to extend the plugin API so plugins can add
arbitrary additional columns.

[1] https://code.google.com/p/gerrit/issues/detail?id=627

--
Sebastian Schuberth
Reply all
Reply to author
Forward
0 new messages