Opened 9 years ago

Last modified 4 years ago

#5260 assigned defect

Create example pre-commit hook to stop closing of blocked ticket

Reported by: IBBoard Owned by: Ryan J Ollos
Priority: normal Component: MasterTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


Once the JS is fixed to disable the "resolve as" button when a ticket is blocked and the blocking tickets are open, the ticket cannot be closed from the Web interface. If Trac is being integrated with SVN using the commit hooks, users can still "closes #XX" the ticket and ignore the blocking tickets.

It would be useful if someone could come up with an example pre-commit hook that does all of the usual stuff for checking for valid tickets, but also makes sure tickets being closed aren't blocked by open tickets when a commit is made.

The odd-ball condition that will also need checking is when the blocking open ticket is also being closed in the same commit (e.g. there is a sub-ticket and a master ticket and the commit "fixes #sub and #master" or "closes #master and #sub"). There are also potential chain sequences where X blocks Y, which blocks Z (and potentially more), all of which are open and all of which are being closed in a single commit.

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by Ryan J Ollos

Owner: changed from Noah Kantrowitz to Ryan J Ollos
Status: newassigned

Modify Ticket

Change Properties
Set your email in Preferences
as assigned The owner will remain Ryan J Ollos.

Add Comment

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

Note: See TracTickets for help on using tickets.