Faiulre in client creation in tip

bradymiller wrote on Tuesday, June 15, 2010:

ytiddo,
I’m confused by this:
“if you leave the record number empty, a url is generated incorrectly. this fixes the url generation.”
How do I leave a record number empty? If you want a review, we need to be able to recreate the error.

Plus, why am I spending the time figuring out and testing something that has already likely been appropriately tested?

-brady

ytiddo wrote on Tuesday, June 15, 2010:

to clarify:

the problem occurs when the first item in the page that is being dupe checked is empty, and optional.

the external ID field is what i was referring to.

As for why you’re reviewing… As I work with steven, i figured you would NOT want us reviewing one anothers patches and comitting, as this could cause workplace pressures (of which we have plenty) to short circuit the review process.

Just trying not to commit bad code.

Justin Doiel

sunsetsystems wrote on Wednesday, June 16, 2010:

The patch should work fine but it can be more straightforward:

        // Build and invoke the URL to create the dup-checker dialog.
        var url = 'new_search_popup.php';
        var flds = new Array(<?php echo $mflist; ?>);
        var separator = '?';
        for (var i = 0; i < flds.length; ++i) {
          var fval = $('#form_' + flds[i]).val();
          if (fval && fval != '') {
            url += separator;
            separator = '&';
            url += 'mf_' + flds[i] + '=' + encodeURIComponent(fval);
          }
        }

I’m happy to commit this change if there is no objection.

Rod
www.sunsetsystems.com

sunsetsystems wrote on Wednesday, June 16, 2010:

LOL, so much for the SF forum posting fix!  It interpreted the “i” in brackets as turning on italics, in spite of the “code” tag.

Rod
www.sunsetsystems.com

bradymiller wrote on Wednesday, June 16, 2010:

Justin,
sounds good.

Rod,
no objection :slight_smile:

-brady