#1507 Home tool revisited

v1.0.0
closed
Wolf
sf-4 (350)
General
nobody
2015-08-20
2011-02-16
Mark Ramm
No

The project root should redirect to the first mount in the nav bar to which the user has 'read' access.

Write a script that updates all projects:

  • The home page content should be moved into a new wiki called "Home", in the first position.

  • The home tool itself should then be uninstalled.

Related

Tickets: #2155
Tickets: #2201
Tickets: #2217

Discussion

  • Mark Ramm

    Mark Ramm - 2011-04-20
    • milestone: backlog --> apr-28
     
  • Dave Brondsema

    Dave Brondsema - 2011-04-22
    • Description has changed:

    Diff:

    --- old 
    +++ new 
    @@ -2,7 +2,7 @@
    
     As for the data that may be in the home tool: 
    
    -* If there's no content in the project front page we should replace it with a summary tool, which is a link to he project summary page.  
    +* If there's no content in the project front page (or the content is the same as the project description) we should replace it with a summary tool, which is a link to he project summary page.  
     * If there is content, we should move it into a new wiki called "home"  
    
     The home tool itself should then be uninstalled. 
    
     
  • Dave Brondsema

    Dave Brondsema - 2011-05-11
    • milestone: backlog --> may-19
     
  • Dave Brondsema

    Dave Brondsema - 2011-05-12
    • size: --> 4
     
  • Dave Brondsema

    Dave Brondsema - 2011-05-12
    • Description has changed:

    Diff:

    --- old 
    +++ new 
    @@ -1,8 +1,5 @@
    -I would like to revisit the home tool.  Instead we should make the project developer home whichever tool is set first in the nav bar. 
    -
    -As for the data that may be in the home tool: 
    -
    -* If there's no content in the project front page (or the content is the same as the project description) we should replace it with a summary tool, which is a link to he project summary page.  
    -* If there is content, we should move it into a new wiki called "home"  
    +The project root should redirect to whichever tool is set first in the nav bar. 
    +
    +The home page content should be moved into a new wiki called "Home", in the first position.
    
     The home tool itself should then be uninstalled. 
    
     
  • Wolf

    Wolf - 2011-05-13
    • assigned_to: Wolf
     
  • Wolf

    Wolf - 2011-05-13
    • status: open --> in-progress
     
  • Wolf

    Wolf - 2011-05-13

    after discussion with Mark: redirect project to the first mount in tool-bar order to which the user has 'read' (or better) access, even if that mount is a subproject or the admin tool

    • Description has changed:

    Diff:

    --- old 
    +++ new 
    @@ -1,5 +1,7 @@
    -The project root should redirect to whichever tool is set first in the nav bar. 
    -
    -The home page content should be moved into a new wiki called "Home", in the first position.
    -
    -The home tool itself should then be uninstalled. 
    +The project root should redirect to the first mount in the nav bar to which the user has 'read' access.
    +
    +Write a script that updates all projects: 
    +
    ++ The home page content should be moved into a new wiki called "Home", in the first position.
    +
    ++ The home tool itself should then be uninstalled. 
    
     
  • Wolf

    Wolf - 2011-05-27
    • assigned_to: Wolf --> Dave Brondsema
     
  • Wolf

    Wolf - 2011-05-27

    work is on forge:wo/1507. Script is run like this

        allurapaste script production.ini ../scripts/uninstall-home.py
    

    Things to test: do Wikis still work (particularly changing the home page or turning the discussion/left-bar on or off); are Wikis created in the first position, do they contain the correct content. Are Wikis not created for projects that didn't have home tools. Are all home tools replaced. Does going to the project itself automatically redirect to the new home Wiki now (or whatever mount is first).

    The things not mentioned in this ticket:

    • make new projects create wikis instead of home tool
    • remove home page admin
    • remove Home tool implementation

    are on wo/1507b, but they still need a little more work

     
  • Wolf

    Wolf - 2011-05-28
    • status: in-progress --> code-review
     
  • Dave Brondsema

    Dave Brondsema - 2011-06-02
    • ordered_mounts() has a special case for 'search' which is a code smell. I see that SearchApp has empty sitemap attribute - perhaps it'd work to check that?
    • ac.options['ordinal'] if 'ordinal' in ac.options else 0 couldn't that be better written ac.options.get('ordinal', 0) ?
    • in the script, i think iterating over M.Project.query.find().all() could have mongo cursor issues in prod. See other scripts for a chunked iterator approach
      • also the whole 'u' neighborhood can be skipped -can you put a param in the find() criteria for {'neighborhood_id: {'$ne': ObjectId("4be2faf8898e33156f00003e")}}` ? (that's the u nbhd id in prod)
    • the show left menu option doesn't seem to work, but that's a separate issue - don't worry about it
    • email notification fails with this error. but that might be good, we don't actually want to spam all the projects with emails about this
    21:53:49,769 ERROR [allura.tasks.mail_tasks] Error looking up user with ID %r
    Traceback (most recent call last):
      File "/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/tasks/mail_tasks.py", line 84, in sendmail
        user = M.User.query.get(_id=ObjectId(addr))
      File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-1.9-py2.7-linux-x86_64.egg/bson/objectid.py", line 76, in __init__
        self.__validate(oid)
      File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-1.9-py2.7-linux-x86_64.egg/bson/objectid.py", line 160, in __validate
        raise InvalidId("%s is not a valid ObjectId" % oid)
    InvalidId: None is not a valid ObjectId
    
     
  • Dave Brondsema

    Dave Brondsema - 2011-06-02
    • status: code-review --> in-progress
    • assigned_to: Dave Brondsema --> Wolf
     
  • Dave Brondsema

    Dave Brondsema - 2011-06-03
    • status: in-progress --> closed
    • assigned_to: Wolf --> Dave Brondsema
     
  • Wolf

    Wolf - 2011-06-17

    need re-review of the script on wo/1507... super hard to test so maybe just code review. If you want to try testing, copy the script onto a sandbox that was built before the change to home creation, then run the script and see if it survives

     
  • Wolf

    Wolf - 2011-06-17
    • status: closed --> code-review
    • assigned_to: Dave Brondsema --> Rick Copeland ☕
    • milestone: may-26 --> limbo
     
  • Rick Copeland - 2011-06-17

    the code looks good from review -- the proof will be when it's run I guess.

     
  • Rick Copeland - 2011-06-17
    • status: code-review --> validation
    • assigned_to: Rick Copeland ☕ --> Wolf
    • milestone: limbo --> jun-17
     
  • Dave Brondsema

    Dave Brondsema - 2011-06-27
    • status: validation --> closed
     

Log in to post a comment.