Roundup Tracker - Issues

Issue 2550854

classification
including new field in All text* search
Type: behavior Severity: normal
Components: Documentation, Database Versions: 1.5
process
Status: fixed fixed
:
: rouilj : ber, mikeybs, rouilj
Priority: :

Created on 2014-09-22 19:54 by mikeybs, last changed 2016-07-01 21:11 by rouilj.

Messages
msg5146 Author: [hidden] (mikeybs) Date: 2014-09-22 19:54
I created a new field for issues following these instructions

http://roundup.sourceforge.net/docs/customizing.html#changing-what-s-
stored-in-the-database

The new field is a string named "description", here is the relevant 
portion of my schema.py

issue = IssueClass(db, "issue",
                assignedto=Link("user"),
                keyword=Multilink("keyword"),
                priority=Link("priority"),
                status=Link("status"),
                description=String())

Everything is working fine with the new field and I have added a working 
search box for it on the search page.  But I would like the field to be 
included in All text* searches and it currently is not.

According to this it seems that it should automatically be included in 
the All text* search

http://sourceforge.net/p/roundup/mailman/message/12774892/

If I am misreading that post and it should not be automatically included 
in the All text* search, can anyone help with instructions on how to add 
this functionality.  I was not able to find an answer in any 
documentation/wiki/mailinglist.
msg5661 Author: [hidden] (rouilj) Date: 2016-06-27 04:14
Hi Michael:

Sorry for the delay, but I just took a look at hyperdb.py
and the String class. I see:

class String(_Type):
    """An object designating a String property."""
    def __init__(self, indexme='no', required=False, default_value = ""):
        super(String, self).__init__(required, default_value)
 
I think changing:

issue = IssueClass(db, "issue",
                assignedto=Link("user"),
                keyword=Multilink("keyword"),
                priority=Link("priority"),
                status=Link("status"),
                description=String())

to

issue = IssueClass(db, "issue",
                assignedto=Link("user"),
                keyword=Multilink("keyword"),
                priority=Link("priority"),
                status=Link("status"),
                description=String(indexme='yes'))

followed by a roundup-admin reindex should do the trick.

I think the customizing.txt doc is wrong and the default value is 'no'
as indicated in the design.txt doc and the code.

Can you test and if things work I'll change the doc.

-- rouilj
msg5699 Author: [hidden] (rouilj) Date: 2016-07-01 21:11
I verified this.

Added a new String() field summary to the issue class in the classic
tracker created by demo.py:

I used the below but without indexme='yes' the first time through.

issue = IssueClass(db, "issue",
                assignedto=Link("user"),
                keyword=Multilink("keyword"),
                priority=Link("priority", quiet=True),
                summary = String(indexme='yes'),
                status=Link("status"))

Added entries for summary to issue.item.html and issue.search.html
files copying the tal/html entry for the title param in each file.

When I added "zoot zorch" as the summary content for one issue, I could
find that same issue by looking for zoot using the summary field search
box in issue.search.html. However I could not find it using the all text
search nor could I find it using the text search at the top right of the
web page.

I then edited schema.py and added indexme="yes" as shown above.
Ran a reindex using:

  python roundup/scripts/roundup_admin.py -i demo reindex

searched for zoot using the all text search and the top right hand
search box. Both of them returned the correct issue.

Changed customizing.txt indicating 'no' is the default value.

See: f74300d1494e
History
Date User Action Args
2016-07-01 21:11:31rouiljsetstatus: open -> fixed
resolution: fixed
type: behavior
messages: + msg5699
components: + Database, - Web interface
2016-06-27 04:14:02rouiljsetstatus: new -> open
assignee: rouilj
messages: + msg5661
components: + Documentation
nosy: + rouilj, ber
2014-09-22 19:54:27mikeybscreate