#13406 closed defect (fixed)
namespace collision with TracTicketValidator
Reported by: | solstice333 | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | TracTicketValidatorPlugin |
Severity: | normal | Keywords: | ticket, validation |
Cc: | Trac Release: |
Description
On plugin load either TracTicketValidator or TicketValidator is selected making it impossible to use both
Attachments (0)
Change History (8)
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
I'm okay with the rename. I'm not sure how that affects other users and backwards compatibility though.
comment:3 follow-up: 7 Changed 7 years ago by
One thing that's unclear to me is if I'm using both TracTicketValidator and TicketValidator (TicketStateValidator), should I expect TicketValidator to precede TracTicketValidator's validation rules since they both use the [ticketvalidator]
section. For example, in trac.ini,
[ticketvalidator] sha.rule = \[[a-f0-9]{8,}/foo_repo\] sha.tip = resolution SHA requires formatting syntax of "[<sha>/foo_repo]" where <sha> is replaced with a SHA of 8 characters or more closed.required = sha
which I believe the semantics are -- on the closed state, require the sha field, and require the sha field to be of valid syntax for SHA and changeset traclink. Otherwise, on every other state, ignore all requirements for the sha field.
Maybe this is slightly out of scope of the ticket description though....
comment:5 Changed 7 years ago by
Component: | TicketValidatorPlugin → TracTicketValidatorPlugin |
---|---|
Owner: | set to Ryan J Ollos |
Status: | new → accepted |
comment:7 follow-up: 8 Changed 7 years ago by
Replying to solstice333:
One thing that's unclear to me is if I'm using both TracTicketValidator and TicketValidator (TicketStateValidator), should I expect TicketValidator to precede TracTicketValidator's validation rules since they both use the
[ticketvalidator]
section.
The option names don't overlap, so it doesn't appear to be a problem that the plugins use the same section name. The order in which ITicketManipulator
s are called in not defined, however any of the implementers can reject the ticket change.
It appears that sha.rule
will need to be satisfied for every ticket state.
I think it would be good to eventually merge the two plugins together, but not sure when I will have time to work on that.
comment:8 Changed 7 years ago by
Replying to Ryan J Ollos:
Replying to solstice333:
One thing that's unclear to me is if I'm using both TracTicketValidator and TicketValidator (TicketStateValidator), should I expect TicketValidator to precede TracTicketValidator's validation rules since they both use the
[ticketvalidator]
section.The option names don't overlap, so it doesn't appear to be a problem that the plugins use the same section name. The order in which
ITicketManipulator
s are called in not defined, however any of the implementers can reject the ticket change.It appears that
sha.rule
will need to be satisfied for every ticket state.I think it would be good to eventually merge the two plugins together, but not sure when I will have time to work on that.
No worries. I don't think it's too big of a deal for me at the moment. I was able to settle with using tracticketvalidatorplugin for validation in combination with a slightly customized version of keepinterfacesimpleplugin to conditionally hide fields. Thanks for looking into it.
One option would be to rename this plugin to
TicketStateValidator
.