The SN Quick Field Module to add fields to any content type in a fast and efficient manner with minimal configurations. Other feature of this module is to clone a field within same content type.

Features:

  1. Quickly creates new field.
  2. Clone an existing field into same content type / bundle.
  3. Delete multiple fields in a single go.

GIT URL: http://git.drupal.org/sandbox/gaurav.pahuja/2054331.git

Motivation for writing this module came while creating multiple fields (around 35) for a particular content type which is quite cumbersome process involving 3 page submits. Moreover usually administrator don't change default field and widget level settings. That was causing me unnecessary work.

Modules that I reviewed:
https://drupal.org/node/2065849#comment-7820899
https://drupal.org/node/2048135
https://drupal.org/node/2063215

Comments

Title:SN Quick Add ModuleSN Quick Field Module

Hi

There are some errors reported by automated review tools. See
http://pareview.sh/pareview/httpgitdrupalorgsandboxgauravpahuja2054331git
resolve the issue genrated by automated script first.

Thanks,
Ajesh

Hi,

I had quick review, and was trying to create some fields one after one, without saving settings and got following errors:

Notice: Undefined index: translatable in sn_quick_field_create_field() (line 158 of D:\xampp\htdocs\dev7\sites\all\modules\sn_quick_field\add_field.admin.inc).
Notice: Undefined variable: has_data in sn_quick_field_get_field_settings() (line 217 of D:\xampp\htdocs\dev7\sites\all\modules\sn_quick_field\add_field.admin.inc).
Notice: Undefined index: message in sn_quick_field_create_field() (line 178 of D:\xampp\htdocs\dev7\sites\all\modules\sn_quick_field\add_field.admin.inc).
Notice: Undefined index: #commands in sn_quick_field_add_new_field_form() (line 119 of D:\xampp\htdocs\dev7\sites\all\modules\sn_quick_field\add_field.admin.inc).
Notice: Undefined index: message in sn_quick_field_add_new_field_form() (line 119 of D:\xampp\htdocs\dev7\sites\all\modules\sn_quick_field\add_field.admin.inc).

Thanks

Status:Needs review» Needs work

Priority:Normal» Major

Hi,

Please find some of my quick review comments.
1) Unused parameter $value in function _sn_quick_field_field_name_exists($value) line 121 of sn_quick_field.module
2) Please give one space gap between two menu items in line no 80 of sn_quick_field.module
3) Please change commenting for sn-quick-add-field-form.tpl.php and make it specific to quick field.
4) Please remove unwanted unset($_SESSION['data']) in line no 49 for sn-quick-add-field-form.tpl.php
5) Please give one space gap between two array declaration in function sn_quick_field_clone_field_form_submit($form, &$form_state) on line no's 96, 102, 106 for clone_field.admin.inc
6) Please give one space gap between each loop and condition.

Thanks,
Paritosh Gautam

Status:Needs work» Needs review

Paritosh,

Thanks for the feedback.Review comments have been incorporated. Please review.

Thanks

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.

Issue summary:View changes

Added GIT URL

Hi,

Add [D7] in issue title and project url, see https://drupal.org/node/1011698.

Priority:Major» Normal

Title:SN Quick Field Module[D7] SN Quick Field Module

Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://drupal.org/node/2077789

Project 2: https://drupal.org/node/2070535

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

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

Issue summary:View changes

Description updated

Adding review bonus tag.

Status:Needs review» Needs work

The function _sn_quick_field_field_name_exists() is always returning FALSE. I don't see any need of this function.

Hi. I did manual review for your project.

1. pareview http://pareview.sh/pareview/httpgitdrupalorgsandboxgauravpahuja2054331git

Create field form
2. When I create field, it shows few messages like "Notice: Undefined index:", see https://drupal.org/node/2070535#comment-7777973

3. the create field form doesn't look userfriendly. May be it is better to add a submit button to the from with ajax instead of using ajax for widget select element.

4. Line 118 in add_field.admin.inc - you create field in form definition callback. Move it to the submit callback.

5. Make form elements in the form required. As I see, when I choose field type and widget, but leave field name empty, it tries to create field anyway. But it shows no error messages.

6. Once it created field without widget https://www.dropbox.com/s/tuiyxzt5rq946ne/field_without_widget.png

7. I created a date field, then it shows wrong settings from. Save button was moved up https://www.dropbox.com/s/zpzqrzjhzt0yici/quick_field_settings_form.png

Clone field form
8. line 117 in clone_field.admin.inc. Use drupal_set_message(t('A message'), 'error').

Module provides really useful features, but for now it requires much bugfix.

Status:Needs work» Closed (duplicate)
Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://drupal.org/node/2083109

Project 2: https://drupal.org/node/2070535

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

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

Hi gaurav.pahuja ,

thanks for your work. I did a manual review, this is what I saw:

There are too many files in the root folder. I would advise to create different folders for different files, like /includes, /assets, js/ ... depending on your needs of course (if your module have js, css, etc...).

I would include all your .inc files in the includes/ folder, for example.

Correct me if I am wrong, but if your form fails you should set a message with drupal_set_message, throwing an error (as you do in _quick_field_add_new_field_form), but your module has different returns in different points in the same function, which is not a good practice (a function as per definition should have just one return). I am talking about the sn_quick_field_create_field function.

The tpl you are using in

  $form['#theme'] = 'sn_quick_field_add_new_field_form';

should also being included in a /templates folder, for example. It is just a recommendation to make the module folder cleaner.

This question is probably my fault, sorry for that. I've installed the module, the README instructions are fine, but I do not know how to use it or which advantage give when creating a field. I have tried to create a new field, for example, from the content type menu, but I do not see the functionality of the module. Again, sorry because it is probably my fault that I am not seeing something.

Lastly, review your coding standards as I think you have several issues (recommended tool pareview.sh/pareview)

Thanks again for your work.

Issue summary:View changes

Added reviewed modules.