Modify

Opened 14 years ago

Closed 14 years ago

#7862 closed defect (fixed)

How does restriction work?

Reported by: Chris.Nelson@… Owned by: Mark Ryan
Priority: normal Component: ChildTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

ChildTicketsPlugin says it can

  • to restrict the type of child-ticket

And I see the example of

[childtickets]
...
parent.enhancement.restrict_child_type = bug-fix, task

But I can't find "restrict" in the code. Is this feature not implemented?

Attachments (0)

Change History (6)

comment:1 Changed 14 years ago by Mark Ryan

Status: newassigned

comment:2 Changed 14 years ago by Mark Ryan

Hi Chris

Thanks for spotting this....

The 'feature' should be enabled but I took it out some time ago as it has a couple of 'knock-on' questions that were never a concern at my last work place but could be for other organisations. For example:

  • If you restrict the child type that a parent type can have and then change the 'type' of a parent (already with children), should that action be allowed? ie. The parent now has 'illegal' children!
  • Similarly, if you change the trac.ini file (ie. parent.xxx.restrict_child_type), what happens to all the 'xxx' tickets with children of the wrong type?

I'll remove the documented feature from the wiki page for now and have a think about getting it working properly...

Perhaps the issues are not a problem as anyone using the plugin could simply ignore this feature anyway? Is this a feature that you would see as being useful?

Thanks again Mark

comment:3 in reply to:  2 Changed 14 years ago by Chris.Nelson@…

Replying to walnut:

Thanks for spotting this.... ... I'll remove the documented feature from the wiki page for now and have a think about getting it working properly...

Perhaps the issues are not a problem as anyone using the plugin could simply ignore this feature anyway? Is this a feature that you would see as being useful?

I imagine it would be tricky to implement and we're not that fascist about our restrictions. I don't personally have a need or desire for this features. I spotted it when I was porting your fine-grained configuration to SubticketsPlugin and wanted to make sure I'd gotten them all. I realized that 1) I hadn't gotten this one and 2) I couldn't find source for it in ChildTickets, and 3) I couldn't figure out how to do it.

If you're going to take out that doc for your plugin, then I'm done porting. :-)

comment:4 Changed 14 years ago by Mark Ryan

(In [9352]) see #7862

  • Re-merged code to allow a restriction on the child type generated.
  • If a parent should NOT have children but manages to 'adopt' (ie. children were there before type change for example), then the children ticket list will be visible but it is not possible to create more children (also subsequent edits

svn commit --message

comment:5 Changed 14 years ago by Mark Ryan

Fixes applied in [9352], I shall update the trac-hacks wiki page (with correct info AND a couple of caveats!) and close ticket.

comment:6 Changed 14 years ago by Mark Ryan

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Mark Ryan.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.