Forum OpenACS Q&A: More Patch-a-Bug features in the SDM ...

I took a day off yesterday, so I had some time to fix some things in the SDM. I think the Patch-a-Bug functionality is now good enough for day to day use, there's probably that should be added later on - but I'm a bit hesitant to do that in 3.2.5...

Here's what's been done:

  • Fixed the sdm_admin_check so it isn't hardwired to give user_id #4 admin rights.
    proc sdm_check_admin {} {    
        upvar db db
        
        set user_id [ad_verify_and_get_user_id $db]
    
        #don't bother with further checking if user is site-wide admin 
        if { [ad_administrator_p $db $user_id] } { return 1 }
    
        #member of administration/sdm?
        set ad_group_member_p [database_to_tcl_string $db "select 
    ad_group_member_p($user_id, (select group_
    id from administration_info where module = 'sdm'
       and submodule isnull)) from dual"]
    
        return [ad_decode $ad_group_member_p "t" 1 0]
    
    }
    
    for that purpose, I also added
    select
       administration_group_add ('Software Development 
    Managers', 'SDM', 'sdm', '', 'f', '/sdm/');
    
    to sdm.sql.
  • I updated open-bafs.tcl, so it returns a count of the number of patches available for a BAF, I hope this doesn't increase the server load too much, as it is a very useful feature, I think. You can now quickly see what needs doing, and what other people are working on.
  • copied open-bafs.tcl to closed-bafs.tcl and changed some 'open's to 'closed's and vice versa.
  • In the package-patches screen, added some filters (show all, accepted, rejected, new(default)) so the package admin can quickly determine what needs to be done.
  • Added patch-reject.tcl. It didn't exist, so you could not reject a patch - very inconvenient.

I have left the hardcoded 'licence' file in sdm-defs.tcl, I think you should at least be able to define a licence on a per package basis, possibly with overrides per module. That should be 4.x stuff - me thinks. I can change it to a config file parameter for now.

Another thing that still needs doing is adding the ability to edit a patch content & release version. Without this, the tiniest typo would require resubmitting a patch before it can be commited to CVS.

I would like to suggest dropping the BAF 'rating' and '#interest' columns display in open/closed-bafs.tcl, they really clutter the screen, and do not seem very useful to me. We should consider hijacking the 'I'm interested' feature and use it for 'I'm working on it' (which should probably automatically be dropped after a week or two, or keep bugging the person with emails to encourage updating the status). That would make it much simpler to keep track of what to do next. Again, probably 4.x stuff.

I would very much appreciate it if some folks were to test the SDM at pascal.scheffers.net/sdm and report their experiences back to me. I think I have covered everything with my developer test, so I need some 3rd party testing. The CVS-commit does not work. If someone has an CVS server with a test package in it, that would be a great help (you can configure that as the SDMadmin). In general, please be as abusive as possible with the SDM but please do not kill the rest of my site :) . The SDM administrator account is 'sdmadmin@scheffers.net', password 'sdmadmin'. Email to that user will bounce, by the way.

To Roberto: If you want to include this in 3.2.5, please say so. I'll prepare the patches against the latest CVS version and extract the SQL changes for the upgrade script (no changes to existing tables, only additions). Again, this was built on 3.2.5 and the version you see at pascal.scheffers.net is running in 3.2.4.

Collapse
Posted by Jonathan Marsden on
I'm about to go poke your SDM a little.  Did you see Roberto's recent
bug report #952 against SDM, and my comments on it?

I have a feeling this stuff may not make it into 3.2.5, given
Roberto's final exams are this week (!).  And that's probably fine.
3.2.6 in a month or so has been hinted at already 😊

Collapse
Posted by Jonathan Marsden on
Didn't have a lot of time, but I played some.

Should't patches submitted or comments on bugs/patches/features
show up on a user's main info page such as

  http://pascal.scheffers.net/shared/community-member.tcl?user_id=3

??  They don't seem to.  There seems to be a separate sdm one-user.tcl
but there's no link to it from the same user's community-member.tcl,
or from the user's community-member.tcl to the sdm/one-user.tcl page.

Not a bug exactly... but it's all I found to complain about so far 😊

Oh, and shouldn't there be a way to comment on a patch from the
screen which displays, it, ie. sdm/one-patch.tcl?patch_id=WHATEVER

I have a few somewhat more fundamental ideas for SDM as a whole,
I need to write them up as a bboard item...