Patch Proposal: [Make sure topics get the right pre/post-fix]
Motivation
When users create a (say)
bug topic, I would like to make sure the topic has
Bug as postfix (or prefix).
Description / Implementation
I would like the following snippet of code to enter Dakar release
Edit.pm if possible.
sub edit{
...
my $meta = "";
my $extra = "";
# Ammendment begin
# Get topic pre- and postfixes and add them to topic IFF they are not already pre/postfixed
{
my $pre = $query->param('topicprefix');
my $post = $query->param('topicpostfix');
$topic= $pre.$topic unless($topic=~/^$pre/i);
$topic= $topic.$post unless($topic=~/$post$/i);
}
# Ammendment end
my $topicExists = &TWiki::Store::topicExists( $webName, $topic );
...
}
Thanx
Documentation
To go into
Template Topics in Action in
TWikiTemplates
| Parameter |
Description |
topicpostfix |
If set topicname is guaranteed to contain this postfix (once only), .e.g. you write topicpostfix=Bug user specify topic name IeAuthentication topic becomes IeAuthenticationBug |
topicprefix |
If set topicname is guaranteed to contain this prefix (once only). |
--
NielsKoldso - 14 Nov 2004
Discussion:
Moved this to be a
PatchProposal... hope its simplicity allow me not to do the
diff -u thing
The above
"diff" is against the Cairo:
TWikiRelease02Sep2004
--
NielsKoldso - 28 Dec 2004
I would like to propose this for Dakar.
--
NielsKoldso - 02 Sep 2005
Niels,
I think you can already do this, without needing any extra parameters - see
http://develop.twiki.org/~develop/cgi-bin/view/Bugs/AllOutStandingItems
for an example of how we do this to create new Bug entries.
--
SvenDowideit - 03 Sep 2005
Hi Sven, I don't see any
forms for creating
new bug entries when I follow your link, could you elaborate?
--
NielsKoldso - 13 Sep 2005
"Create New Item" is in the WebLeftBar; here's a direct link:
http://develop.twiki.org/~develop/cgi-bin/edit/Bugs/ItemXXXXXXXXXX?templatetopic=Bugs.HideTextarea&formtemplate=Bugs.ItemTemplate&action=form
--
WillNorris - 13 Sep 2005
Hey - I'm not the only one who finds "Create New Item" to be a non-inuitive equivalent for "Create New Bug Report" or "Create New Issue Report". I added a comment to this effect on the intro page
http://develop.twiki.org/~twiki4/cgi-bin/view/Bugs
--
AndyGlew - 02 Oct 2006
I changed the link in the sidebar of the
Bugs:WebHome
web to "Create bug report" to make more obvious. I also added some help text to the bugs home.
--
PeterThoeny - 02 Oct 2006