Modify

Opened 8 years ago

Last modified 7 years ago

#13006 new defect

How to integrate code reviews into the Trac workflow

Reported by: mx.tian@… Owned by:
Priority: normal Component: CodeReviewerPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.2

Description (last modified by Jun Omae)

I introduce the document in accordance with the realization of the project, to the application of a problem. wiki:CodeReviewerPlugin#Workflow-fieldvalidation

My project workflow is as follows:

accept = new -> assigned
accept.default = 997
accept.name = 领取任务
accept.operations = set_owner_to_self
accept.permissions = TICKET_MODIFY
create = <none> -> new
create.default = 993
create.name = 创建任务
create_and_assign = <none> -> assigned
create_and_assign.default = 992
create_and_assign.name = 创建并指派任务
create_and_assign.operations = may_set_owner
create_and_assign.permissions = TICKET_MODIFY
leave = assigned,new,reviewing,accepted,reopened,closed -> *
leave.default = 1000
leave.name = 初始化
leave.operations = leave_status
reassign = assigned,new,reviewing,accepted,reopened -> assigned
reassign.default = 995
reassign.name = 指派
reassign.operations = set_owner
reassign.permissions = TICKET_MODIFY
reassign_reviewing = reviewing -> *
reassign_reviewing.default = 994
reassign_reviewing.name = 重新提交审查
reassign_reviewing.operations = set_owner
reassign_reviewing.permissions = TICKET_MODIFY
reopen = closed -> reopened
reopen.default = 996
reopen.name = 激活任务
reopen.operations = del_resolution
reopen.permissions = TICKET_CREATE
resolve = reviewing,reopened -> closed
resolve.default = 999
resolve.name = 关闭任务
resolve.operations = set_resolution
resolve.permissions = TICKET_MODIFY
review = assigned -> reviewing
review.default = 998
review.name = 提交审查
review.operations = set_owner
review.permissions = TICKET_MODIFY

The control document attempts to configure the following, but without success.

[ticket-custom]
phase = select
phase.options = assigned|new|reviewing|accepted|reopened|closed
phase.invalid_if.1 = reviewing
phase.invalid_when.1 = .codereviewstatus .pending
phase.invalid_if.2 = closed
phase.invalid_when.2 = .codereviewstatus:last .failed

Attachments (2)

27a7d36fa1889e1c844258d16902125e.png (38.2 KB) - added by mx.tian@… 8 years ago.
Screen Shot 2017-05-22 at 20.49.38.png (17.5 KB) - added by Ryan J Ollos 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by mx.tian@…

comment:1 Changed 8 years ago by mx.tian@…

Last edited 8 years ago by Jun Omae (previous) (diff)

comment:2 Changed 8 years ago by Jun Omae

Description: modified (diff)
Trac Release: 1.2

Changed 7 years ago by Ryan J Ollos

comment:3 Changed 7 years ago by Ryan J Ollos

The value of invalid_when is a jQuery selector: .codereviewstatus .<status>. Most likely your <status> entries are incorrect. For example, the defaults are: codereviewerplugin/1.0/coderev/model.py@16566:22#L18.

[codereviewer]
status_choices = FAILED, PENDING, PASSED

What are your status_choices?

Are the code review status messages displaying on the ticket page? Like this:

Can you show a screen capture of similar on your ticket page?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.