Description:

This module is used to change the list field values even if entities are created using it.

By mapping the list fields to new key|value pair, all the entities field values are updated and the allowed list value is changed.

Git clone URL:
git clone --branch 7.x-1.0 http://git.drupal.org/sandbox/immanuel.paul/2549577.git

Sandbox URL: https://www.drupal.org/sandbox/immanuel.paul/2549577

CommentFileSizeAuthor
#4 screenshot-2015-08-17 20-19-53.png47.39 KBajay_reddy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

immanuel.paul created an issue. See original summary.

immanuel.paul’s picture

Issue summary: View changes
irfworld’s picture

Issue tags: +PAreview: review bonus

Hi immanuel.paul,

Please have a look on below errors found by http://pareview.sh/.

Git errors:

Git default branch is not set, see the documentation on setting a default branch.
It appears you are working in the "7.x-1.0" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
The following git branches do not match the release branch pattern, you should remove/rename them. See https://www.drupal.org/node/1015226

* 7.x-1.0
remotes/origin/7.x-1.0
Review of the 7.x-1.0 branch (commit fcc7389):

README.md or README.txt is missing, see the guidelines for in-project documentation.
./list_value_alter.module: all functions should be prefixed with your module/theme name to avoid name clashes. See https://www.drupal.org/node/318#naming

function _list_actual_values($list_val) {
function _all_list_fields($property = NULL) {
function _list_allowed_values($form, $form_state) {
Coder Sniffer has found some issues with your code (please check the Drupal coding standards). See attachment.
DrupalPractice has found some issues with your code, but could be false positives.
FILE: /var/www/drupal-7-pareview/pareview_temp/list_value_alter.module
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
---------------------------------------------------------------------------
32 | WARNING | Unused variable $header.
33 | WARNING | Unused variable $options.
57 | WARNING | Do not use the raw $form_state['input'], use
| | $form_state['values'] instead where possible
60 | WARNING | Unused variable $raw_diff_map.
97 | WARNING | Unused variable $key.
108 | WARNING | Unused variable $entity_type.
109 | WARNING | Unused variable $bundle.
---------------------------------------------------------------------------

Time: 43ms; Memory: 4.75Mb

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.

FILE: /var/www/drupal-7-pareview/pareview_temp/list_value_alter.module
---------------------------------------------------------------------------
FOUND 14 ERRORS AND 3 WARNINGS AFFECTING 15 LINES
---------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
6 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
17 | ERROR | [x] Missing function doc comment
19 | ERROR | [x] No space found before comment text; expected "//
| | dpm($default);" but found "//dpm($default);"
44 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: )
54 | ERROR | [x] Missing function doc comment
95 | ERROR | [x] Missing function doc comment
105 | ERROR | [x] Missing function doc comment
112 | ERROR | [x] Expected 1 space after IF keyword; 0 found
124 | ERROR | [x] Missing function doc comment
128 | ERROR | [x] Missing function doc comment
131 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: 'element'
132 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: )
136 | ERROR | [x] Missing function doc comment
143 | ERROR | [ ] The $text argument to l() should be enclosed within
| | t() so that it is translatable
143 | ERROR | [x] Expected 1 space after comma in function call; 2
| | found
143 | ERROR | [x] Expected one space after the comma, 2 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------

ajay_reddy’s picture

Hi immanuel.paul,

It would be great if you attach README.txt also.
Request you to write comment(s) where necessary in your code so that it will he helpful to understand your code easier.

And What if i have an empty list text and i am rendering it by programatically then we dont have any posibility to change key|value right.
Attaching the screenshot and also change in .module line number 41 as

if (!empty($allListFields[$default])) {
//your foreach code...
}
And also add drupal_set_message() after successfully saved mapping.

Pradnya Pingat’s picture

Hi,

Automated Review

for automated testing error please refer following link : http://pareview.sh/pareview/httpgitdrupalorgsandboximmanuelpaul2549577git

Manual Review

Configure link missing in .info file

configure = link/to/configure/page

Please refer link : https://www.drupal.org/node/542202

Thanks

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

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