Module name: Addressfield - Japanese Postal Code

Description

This module add Japanese postal code(postcode) check and address lookup to Address Field. only for drupal 7.x

Sandbox

https://www.drupal.org/sandbox/everright/2426543

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/everright/2426543.git addressfield_jp

Manual reviews of other projects

CommentFileSizeAuthor
#17 coder-results.txt2.22 KBklausi

Comments

everright’s picture

Issue summary: View changes
PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

Timusan’s picture

Hi Chen

The automated review shows no issues what so ever, good Drupal code conduct!

Manual review:

You have included a very helpful README, which explains clearly how to setup and use the module. Good work. This module also seems to be unique, so no duplication.

I installed the module and followed your guidelines. I live in Japan myself and the module works like a charm. Inserting my home postal code in the form of a 2 part text box fetches my exact address. Works as advertised.

A few nitpicks:

  • The inline comments in your code are quite sparse, maybe describe a bit more of what is happening.
  • In your README you tell people that, if they want to load a local version of the ajaxzip3 library, they should put in in their module directory. I think this may be considered bad practice. Drupal has the sites/all/libraries specifically for this purpose. Better advice would be to install the local version there (and maybe make your module pick it up automatically if it is installed there.)

Yet, overall, I think this module is RTBC? Anyone else?

everright’s picture

Hi Timusan

Thanks for your review and so good suggestions,i will put more comment and update readme。

darol100’s picture

Status: Needs review » Postponed (maintainer needs more info)

@everright.chen

Duplication

This sounds like a feature that should live in the existing Addressfield project. Module duplication and fragmentation is a huge problem on drupal.org and we prefer collaboration over competition. Please open an issue in the Addressfield issue queue to discuss what you need; you likely just need to provide a patch. You should also get in contact with the maintainer(s) to offer your help to move the project forward. If you cannot reach the maintainer(s) please follow the abandoned project process.
If that fails for whatever reason please get back to us and set this back to "needs review".

everright’s picture

Status: Postponed (maintainer needs more info) » Needs review

@darol100

This module is not a Addressfield patches or only extend Addressfield features.

It support find full address by postcode of Japan, user can only type post code of Japan, then get full address.

The module feature like below module, this module support for Japan, below module for UK.

https://www.drupal.org/project/postcodeanywhere_addressfield

Please take a review again.

Thanks

larruda’s picture

Indeed it feels like this should be something part of Addressfield project. @everright.chen, as per @darol100 could you please raise an issue on the referred module's so the community around it can discuss whether or not this makes sense to be part of the project? Please also reference the issue here so we can keep track. Thanks!

darol100’s picture

Status: Needs review » Postponed (maintainer needs more info)

I'm changing the status of this issue to postponed until we can get more information from the developer.

klausi’s picture

Status: Postponed (maintainer needs more info) » Needs review

As we change our project application process in #2453587: [policy, no patch] Changes to the project application review process we are not allowed to block applications base on module duplication. We can still recommend collaboration over competition, but we should not enforce it.

bojanz’s picture

I maintain addressfield.

This is not the kind of functionality we accept in the module, because it's country specific, non-trivial, and usually dependent on an external service.
This is why there's a number of modules offering country-specific address validation/lookups:
https://www.drupal.org/project/postcodeanywhere_addressfield
https://www.drupal.org/project/addressfield_nl_postcode
https://www.drupal.org/project/addressfield_viacep

So, +1 on giving everright.chen his module.

everright’s picture

@bojanz, Thanks for your review and feedback.

@darol100, Could you please have a review again when you are free.

darol100’s picture

@everright.chen,

Good work, I do not see any blockers for this module. Now you need to wait until an administrator check your project. If you want to speed up the process of admin reviewing your project you would need to do 3 manual reviews.

This module pass the automatic review.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
[Yes: Meets the security requirements.
Coding style & Drupal API usage
[List of identified issues in no particular order. Use (*) and (+) to indicate an issue importance. Replace the text below by the issues themselves:
  1. Just a recommendation you should added the hook_help module.

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

darol100’s picture

Status: Needs review » Reviewed & tested by the community
Ken Zhang’s picture

@everright.chen
I tested this module, it seems that works well!

These are my steps:
1. Enable the module.
2. Access admin/config/people/accounts/fields.
3. Create a field with type addressfield.
4. Select "Japan" in both "Available countries" and "Default country" items.
5. Tick off "Postcode check and address lookup (Japan)" and "Enable 3-4 digit format for Japanese postal code" checkboxes in "Format handlers".
6. Save.
Then you can see the "Address lookup" button when you edit user address.
It's kindly easy to use.

Thanks

everright’s picture

Priority: Normal » Major
Issue summary: View changes
Issue tags: +PAreview: review bonus
everright’s picture

@darol100, Thanks for your suggestion. I have finished 3 manual reviews and put links into description, I learned a lot of useful experience from try to contribute back this module and manual review other modules, I will share my experience to our team.

klausi’s picture

Assigned: everright » Unassigned
Status: Reviewed & tested by the community » Fixed
StatusFileSize
new2.22 KB

Review of the 7.x-1.x branch (commit f049115):

js/addressfield_jp.js: line 6, col 1, Error - Missing "use strict" statement. (strict)
js/addressfield_jp.js: line 10, col 52, Error - Missing space before function parentheses. (space-before-function-paren)
js/addressfield_jp.js: line 16, col 43, Error - Missing space before function parentheses. (space-before-function-paren)
js/addressfield_jp.js: line 17, col 48, Error - Missing space before function parentheses. (space-before-function-paren)
js/addressfield_jp.js: line 19, col 6, Error - Split 'var' declarations into multiple statements. (one-var)
js/addressfield_jp.js: line 36, col 6, Error - Split 'var' declarations into multiple statements. (one-var)
js/addressfield_jp.js: line 57, col 6, Error - "AjaxZip3" used outside of binding context. (block-scoped-var)
js/addressfield_jp.js: line 57, col 6, Error - "AjaxZip3" is not defined. (no-undef)
js/addressfield_jp.js: line 58, col 6, Error - "AjaxZip3" used outside of binding context. (block-scoped-var)
js/addressfield_jp.js: line 58, col 6, Error - "AjaxZip3" is not defined. (no-undef)

10 problems
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.
  • This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

    manual review:

    • addressfield_jp_field_attach_presave(): why is this hook implementation necessary, why do you have to copy data around? Please add a comment.

    But otherwise looks good to me, so ...

    Thanks for your contribution, everright!

    I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

    Here are some recommended readings to help with excellent maintainership:

    You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

    Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

    Thanks to the dedicated reviewer(s) as well.

    everright’s picture

    Hi klausi,

    Thanks for your review.

    I have fixed issues of Coder Sniffer, also fixed issues of ESLint except "AjaxZip3", AjaxZip3 variable is defined in 3rd-party library AjaxZip3.js which will be load before this js.

    addressfield_jp_field_attach_presave()

    In Japan, sometimes they want to use two textfields to input their postcode, such as [xxx] - [xxxx]; so in this module, it support one textfield which from original, also create a custom field element to support two textfields, then user can choose 1 or 2 fields which they want.

    For two fields, I have create group field element (jp_postal_code) include 2 textfields (prefix, suffix), it will be assign "jp_postal_code" value to original "postal_code" filed which exist in db table with "presave" function and save into postal_code after postal code pass validated.

    Pending review

    Yes, I have joined the code review group, I will be continuing to review other projects and share my experience to the new guys who want to contribute module.

    Status: Fixed » Closed (fixed)

    Automatically closed - issue fixed for 2 weeks with no activity.