Question
I need to know who is the Issuer (the person who created it) of a Topic when searching via %SEARCH.
The Topics are created via a Template with attached Form (always the same).
First i thought about an additional Field in the Form. But how to fill it automatically when creating the Topic. At the time page with the html form like
...
<form name="new" action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%WEB%">
...
<input type="hidden" name="templatetopic" value="" />
<input type="submit" value=" Create " />
...
is displayed the (wiki-)username is not known and can therefor not assigned to a 'hidden' field of the form.
The second idea was to use the %SEARCH, but select only revision 1.1 of the topics. But how to do that ?
Is there any solution to my problem ?
- TWiki version: 1.Dec 2001
- Web server: Apache
- Server OS: SunOS
- Web browser: Netscape
- Client OS: WinNT
--
PetricFrank - 18 Mar 2002
Answer
This can probably be done with a normal regular expression search, as mentioned under
andgrep
in
CategorySearchForm - on a given page, suffix
?raw=debug
to see the metadata format, then do a
RegularExpression that looks something like
fieldname.*value
where fieldname is the owner field in the metadata, and value is the owner name.
Something like this did seem to work - unfortunately the 'author=' metadata variable seems to mean 'last person to change this page... So I don't think that there is a solution for this at present - the solution is to hack TWiki to record 'firstauthor=' when the topic is created, and do a similar search on that.
Search string:
%SEARCH{"^%META:TOPICINFO\{author=\"PetricFrank\"" regex="on"}%
Searched: ^%META:TOPICINFO\{author="PetricFrank"
Number of topics: 0
See also
CategorySearchForm,
MetaDataSearching and
FormSearches.
--
RichardDonkin - 18 Mar 2002
You can solve this by using a
FormattedSearch to scan for the first signature. Example search for "issue" in topic name:
Number of topics: 90
--
PeterThoeny - 20 Mar 2002
Unfortunately, that's not a reliable way to get the information -- see
BrowserIssues -- I happen to have the first signature on the page, but if you scan back to rev. 1.1, you'll see that
RichardDonkin created the page.
--
RandyKramer - 21 Mar 2002