Are people interested in a patch to allow a description in addition to the wishlist title? So people can have a message associated with their wish list that is displayed when viewed.

I need to implement this functionality, and seems to me useful to other people as well.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

berenddeboer’s picture

Title: Having a wish list description » Adding description field to a wish list
naveenvalecha’s picture

Added parent issue.

naveenvalecha’s picture

Status: Active » Needs review
FileSize
3.39 KB

Patch with the description field.Lemme see about jay suggestions as well.

naveenvalecha’s picture

Rerolled the patch to display the description text above the expiration text.

naveenvalecha’s picture

Assigned: Unassigned » jaykainthola

Assigning to Jay to review and come up with this comments.

naveenvalecha’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
berenddeboer’s picture

Almost there I think. My changes:

  1. Description should be a text field.
  2. Added description field to views.
  3. Avoid XSS attacks.
berenddeboer’s picture

Oops, field handler for new description field was missing.

naveenvalecha’s picture

+++ b/uc_wishlist.install
@@ -154,3 +160,14 @@ function uc_wishlist_update_7001() {
+    db_add_field('uc_wishlists', 'description', $schema['uc_wishlists']['fields']['description']);

Need to add the details regarding the column description as in #4.
@Jay,
told to jay to share his thoughts.

jaykainthola’s picture

@naveenvalecha, Yes, i think, we should include the description for the wishlist.

Thanks,
Jayendra Kumar

naveenvalecha’s picture

got the inputs from @jay above.Assigned to myself. I might reroll it tonight.

naveenvalecha’s picture

Attached a rerolled patch.

naveenvalecha’s picture

Patch added and comitted to 7.x-1.x.

  • naveenvalecha committed 623ac00 on 7.x-1.x
    Issue #2397455 by naveenvalecha, berenddeboer: Adding description field...
naveenvalecha’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Assigned: Unassigned » Sagar Ramgade
Status: Needs review » Patch (to be ported)
berenddeboer’s picture

The description was included, it was done by retrieving the entire field definition from the schema, so we didn't repeat ourselves:

db_add_field('uc_wishlists', 'description', $schema['uc_wishlists']['fields']['description']);

See the reference to $schema?

Now the code includes the $schema variable, but that isn't used. So you either need to remove the $schema variable or call db_add_field() along the lines I proposed.

  • naveenvalecha committed b20c017 on 7.x-1.x
    Issue #2397455 by naveenvalecha, berenddeboer: Removed the unused schema...
naveenvalecha’s picture

Removed the $schema variable.Thanks for pointing!

Sagar Ramgade’s picture

Status: Patch (to be ported) » Needs review
FileSize
4.05 KB

Patch rolled for 6.x-1.x-dev

naveenvalecha’s picture

Status: Needs review » Reviewed & tested by the community

Patch looks ready to go.

naveenvalecha’s picture

Status: Reviewed & tested by the community » Needs work

Needs to remove the description variable in hook_uninstall.Rest seems fine to me.

The last submitted patch, 4: add-description-field-wishlist-2397455-4.patch, failed testing.

The last submitted patch, 3: add-description-field-wishlist-2397455-3.patch, failed testing.

Sagar Ramgade’s picture

Naveen, We ain't adding any description related variable in 6.x, we are adding variable for default title and allow anonymous users to create wishlist. We can take this up in a separate or related issue.

naveenvalecha’s picture

Status: Needs work » Reviewed & tested by the community

ohhhkk let's go it with the current one.

  • Sagar Ramgade committed e5dde85 on
    Issue #2397455 by naveenvalecha, berenddeboer, Sagar Ramgade: Adding...
Sagar Ramgade’s picture

Status: Reviewed & tested by the community » Fixed

Patch committed. Marking it as Fixed.

Status: Fixed » Closed (fixed)

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