Forum OpenACS Q&A: How do I submit a fix (for ad_categorization_widget)?

I assume the SDM is the place to submit a bug and the associated fix, but it's not that clear to me how to use it. I know there is a significant project under way to make it easier to contribute to the community efforts, so I was thinking it would be helpful to have some kind of overview and introductory instructions for the SDM that explain:
  • How to submit a bug, patch, feature request, etc. (e.g., how to report a bug vs. reporting a bug and simultaneously providing the fix)
  • What is a patch? (My fix consists of changing NULL to '' in a single SQL statement. Is that a patch?)
  • Who can submit a bug, patch, feature request, etc.
  • Whether the submitted item will be reviewed. (In this case I'm not sure whether it should go under "General Links" (the only module that appears to use ad_categorization_widget) or "Site-wide Issues" (since it is a general purpose utility procedure))
  • What options one will have for altering/editing the item once it's submitted
  • Etc....

Looking through the previous submissions, I couldn't identify a consistent way of doing things, and I know that more people are likely to contribute if they understand what to do.

1. Yes, the SDM is the right place for OpenACS bug reports.

2. You would report a bug by opening a new bug on the appropriate module.

The appropriate module is the one containing the code concerned, not by the one or ones which depend on or use that code.  OpenACS 3.x is sometimes less than wonderfuly modular -- 4.x is a lot better in that regard.

In this case I'd say ad-categories.tcl is a set of utility procedures, so the bug is at least potentially a 'site-wide issue'...
but that's just one person's opinion; you will not be subjected to massive verbal abuse for picking general links instead 😊

It's often a good idea to post a bboard item saying that you just submitted a patch and bug report, so that your new submision has a better chance of being noticed.

3. A patch is a file containing output from diff that can be applied to the original file(s) using the utility named 'patch' to make the desired change(s).  Typing 'man patch' and 'man diff' on most Unix boxes will get you lots of details.  In general for OpenACS, it is preferred (I think) that patchfiles are generated as unified diffs from the top of the OpenACS tree, though several patches that have been submitted do not seem to have been created this way.

In other words, create a tree say acs3.orig and the one you make your change in say acs3.  Then the command

  diff -uNr acs3.orig acs3 >mypatchfile.patch

would create the relevant patch file.  Look at some existing patchfiles to get the general idea, if you've never created one before.

You can submit patches to the SDM and then associate them with particular bug reports.

4. Anyone (at least any registered user of the OpenACS.Org site) can submit a bug report, or a patch, to the SDM.

5. The module maintainer will review the submitted patch before choosing whether or not to apply it, so don't worry *too* much about getting it 100% perfect first time if you are new to this sort of software development.

6. You can add comments to bugs once submitted.  You can add new revised patches if you need to.

Hopefully this is enough info to get you started.

All of this is just my opinion and totally unofficial... but if it's wrong, someone is likely to respond telling me so!

And if someone wants to create an SDM FAQ... that might be good 😊

<blockquote> It's often a good idea to post a bboard item saying that you just
submitted a patch and bug report
</blockquote>

Hmmm... this sounds like a potential feature request for the SDM.  "Click here to announce your patch to the following bboard(s)", or something along those lines.  What sort of notification does the SDM currently do anyways?

<blockquote> And if someone wants to create an SDM FAQ... that might be good 😊
</blockquote>

Good idea.  And your post provides an excellent starting point!

   What sort of notification does the SDM currently do anyways?

It sends email to those who register as interested in an SDM 'package' when a new patch is submitted to it. It probably does more than that, but that's the one I notice myself.

My suggestion of starting a bboard thread is borne more of the current OpenACS.Org community tendency to be very bboard-centric, and to have large numbers of bug reports in the SDM (making it hard to wade through at times), than of any great theoretical or philosophical reason to do this. In the ideal world, perhaps, those interested in SDM packages would all register that interest with the SDM, and so be notified by it, use its comment facilities, etc. But this particular online community isn't currently operating that way in practice, so using the bboard helps 😊

So I'm not sure that creating new functionality to generate bboard posts about patch submittals is the right way ahead; it would just reinforce current (possibly suboptimal) community behaviour.

Walter: Are you willing to take the info here and create an SDM FAQ for us?

The new site design will have a projects page that will include summaries of recent bug reports and feature requests, much as the news  widget displays recent news posts.

At least, that's what we're talking about ... we'll want to make the projects page so useful that people who are working with the code will  gravitate there - this should help make the community less "bboard-centric" and more aware of the other tools available, and of activity in other packages like the SDM without having to dig around by hand as is the case now.

Thanks for all the great feedback.  I would be happy to try to capture all this and produce a FAQ out of it.  I'm probably in a good position to do it, since I haven't been using the SDM up to now and I will therefore have the perspective of a newbie.

I guess I will take the suggestions here and follow through the process, making notes along the way, and then put it into a draft for a FAQ.  Where should I put it or who should I forward it to when it's ready for review?

Walter, the answer to you questions is in "The FAQ about FAQs" (https://openacs.org/faq/one-faq?faq_id=43842). It lists what you should do and contact to get your FAQ up on openacs.org/faq.