Opened 12 years ago
Closed 7 years ago
#11093 closed defect (duplicate)
subversion hook scripts do not respect the trac workflow
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | version control | Version: | |
Severity: | normal | Keywords: | workflow |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
If i configure the following workflow within trac:
leave = * -> * leave.default = 1 leave.operations = leave_status accept = new,assigned,reopened -> accepted accept.operations = set_owner_to_self accept.permissions = TICKET_MODIFY reassign = new,assigned,accepted,reviewing,reopened -> assigned reassign.operations = set_owner reassign.permissions = TICKET_MODIFY review = new,assigned,accepted,reopened -> reviewing review.operations = set_owner review.permissions = TICKET_MODIFY reopen = closed -> reopened reopen.operations = del_resolution reopen.permissions = TICKET_CREATE resolve = reviewing -> closed resolve.operations = set_resolution resolve.permissions = TICKET_MODIFY
it should be not possible to switch from any other state than reviewing to closed. But with subversion hook scripts like trac-svn-post-commit-hook this is totally ignored and tickets can be closed directly from new or other states.
Attachments (0)
Change History (9)
comment:1 by , 12 years ago
Component: | general → version control |
---|---|
Description: | modified (diff) |
Keywords: | workflow added |
Milestone: | → next-stable-1.0.x |
comment:2 by , 9 years ago
It should also be possible to switch to other states than closed. In the example above the keyword fixed in a commit message could put a ticket into the state reviewing.
comment:3 by , 9 years ago
Ideally the keywords and the transitions they effect should be configurable, e.g. one can configure new keywords.
follow-up: 5 comment:4 by , 9 years ago
Additionally a sort of dry-run handler should be added. This handler could be run in the pre commit hook. It would allow to abort a commit when the committer does not have sufficient rights to perform the actions mentioned in the commit message or if the mentioned actions are not plausible (e.g. closing an already closed ticket).
One example could be to enforce the following rules:
- Every commit must mention at least one ticket.
- All mentioned tickets must be in the state open.
comment:5 by , 9 years ago
Replying to Sebastian Dietrich:
One example could be to enforce the following rules:
- Every commit must mention at least one ticket.
- All mentioned tickets must be in the state open.
comment:6 by , 8 years ago
Milestone: | next-stable-1.0.x → next-stable-1.2.x |
---|
Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.
follow-up: 8 comment:7 by , 7 years ago
I am hitting the same problem. I used to have a custom post-commit that no longer works after we upgraded to 1.2.2, but the new tracadmin changeset approach is directly changing the status to closed
, bypassing our custom workflow.
comment:8 by , 7 years ago
Replying to anonymous:
I am hitting the same problem. I used to have a custom post-commit that no longer works after we upgraded to 1.2.2, but the new tracadmin changeset approach is directly changing the status to
closed
, bypassing our custom workflow.
comment:9 by , 7 years ago
Milestone: | next-stable-1.2.x |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
This is non-trivial to fix properly. For an immediate solution, you could copy commit_updater.py
and create a new single-file plugin to fit your needs. See comment:5:ticket:10755.
Duplicate of #10755.
This is likely an oversight.