#7278 Admin search page for projects

v1.2.0
closed
42cc (432)
General
2015-08-20
2014-03-20
No

Using the indexing set up in [#7257], provide a site admin page to search for projects and list the results. Provide options for which field to search by. Must include at least project shortname, project full name, and custom fields that are indexed (i.e. sfx group_id for SourceForge - could be specified in .ini file). Simple text box and selector for field should be fine I think. Form should be a simple GET so that URL can be easily modified (browser custom searches etc).

Then list the results, including easy pagination. List columns should include shortname w/ link to project, full name, date registered, deleted flag, and any custom fields.

We'll do something similar for users later, so keep that in mind, developing generic re-usable functions and templates if appropriate.

Related

Tickets: #7257

Discussion

  • Dave Brondsema

    Dave Brondsema - 2014-03-20

    The results should also include links directly to "members" /p/PROJECT/admin/groups/ and "audit trail" /p/PROJECT/admin/audit/

     
  • Dave Brondsema

    Dave Brondsema - 2014-03-20
    • labels: 42cc -->
    • status: in-progress --> open
     
  • Dave Brondsema

    Dave Brondsema - 2014-06-18
    • labels: --> 42cc
    • status: open --> in-progress
     
  • Igor Bondarenko - 2014-08-04
    • status: in-progress --> code-review
     
  • Igor Bondarenko - 2014-08-04

    Closed #612. je/42cc_7278

    I was not able to find where sfx group_id is indexed (perhaps it's not yet, since SFProjectRegistrationProvider does not implement index_project())

    I've tested with other fields. Look at commented example in the development.ini

     
  • Igor Bondarenko - 2014-08-05

    Updated branch with changes for [#7583]

       79d15cb..fa502f3  je/42cc_7278 -> je/42cc_7278
    
     
  • Dave Brondsema

    Dave Brondsema - 2014-08-18
    • status: code-review --> in-progress
    • assigned_to: Igor Bondarenko
    • QA: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2014-08-18

    Layout issue, see attached.

    If mongo & solr aren't in sync, can get error:

    File '/home/dbrondsema/dbrondsema-1019/forge/Allura/allura/controllers/site_admin.py', line 303 in search_projects
      p['project'] = mongo_projects[_id]
    KeyError: '536d00a8d8be354ed703137b'
    

    I even tried re-running Allura/allura/scripts/reindex_projects.py but that didn't seem to help. Maybe we need a separate ticket to make reindex_projects clear out old entries? What do you think? (In other scenarios I've used a last-indexed field in each doc and then delete all old docs where the last-indexed value is older than the start time of the script).

    On the result links, the main project link is incorrectly going to http://localhost/p/testit/ for me instead of using the correct domain.

    Should partial matches on full name work? I would like them to. I have a project named "Test it..." and a search for "test" isn't matching. This might be an issue with the solr config/version I'm using though?

    When EasyWidgets isn't so easy (often!) feel free to not use it. We have some forms that don't use it and I think that is fine if it makes things actually easier. Off the top of my head perhaps the project import forms are like that.

     
  • Igor Bondarenko - 2014-08-19

    We can make reindex_projects clear out old entries, if we want to keep solr index clearer, but it's not essential, I think. The search code should be rewritten to handle that case gracefully, and we can adjust the command later.

    About partial match on full name. I think it would work if we change the type of solr field from type_s to type_t without any changes to solr configuration.

    When EasyWidgets isn't so easy (often!) feel free to not use it.

    Yeah, okay :) Don't like to write a lot of html manually though :)

     
  • Dave Brondsema

    Dave Brondsema - 2014-08-19

    Sounds good. Should be a corner case anyway to have a project in solr that doesn't exist in mongo at all any more.

     
  • Igor Bondarenko - 2014-08-20
    • status: in-progress --> code-review
     
  • Igor Bondarenko - 2014-08-20

    Closed #638. Force-pushed je/42cc_7278

     
  • Dave Brondsema

    Dave Brondsema - 2014-08-21
    • status: code-review --> closed
    • Milestone: forge-backlog --> forge-aug-22
     
  • Dave Brondsema

    Dave Brondsema - 2015-01-05
    • Milestone: unreleased --> asf_release_1.2.0
     

Log in to post a comment.