Defect #1054

Allow any property value code (in alias field) + properties + perimeters

Added by Blatti Yves almost 4 years ago. Updated over 3 years ago.

Status:ClosedStart date:07/03/2015
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:SHOP
Target version:4.3.2
Affected version:4.0.0

Description

In SHOP property values we set codes that are transmitted over WPS/REST service to providers.
In easySDI V2, that was a distinct field named CODE. In V4 this value is stored in the alias field.

Problem is by using the alias field, the values have to be "URL safe" and unique. But:
- On some system the values are predefined (we have upper cases values on some remote systems)
- Values are the same in multiple properties ("YES" or "TRUE" for example) and they become "yes-1" by getting aliased.

I suggest disabling this mechanism by overriding the check() function to avoid altering alias in Easysdi_shopTablepropertyvalue class.
Since theses aliases are never used in frontend they don't have to be unique nor URL safe.

Sample code :

    public function check() {
        $fields = $this->getFields();
        //If there is an ordering column and this is a new row then get the next ordering value
        if (property_exists($this, 'ordering') && $this->id == 0) {
            $this->ordering = $this->getNextOrder();
        }
        //Do not call parent check to avoid alias alteration
        return true;
    }

Is it OK for TC if I correct this in the proposed way?
Thank for your responses.

History

#1 Updated by Blatti Yves almost 4 years ago

  • Subject changed from Allow any property value code (in alias field) to Allow any property value code (in alias field) + properties + perimeters

Same applies to perimeters and properties alias !

#2 Updated by Van Hoecke Hélène almost 4 years ago

It's OK with me.

#4 Updated by Blatti Yves almost 4 years ago

  • Status changed from Affected to Resolved
  • % Done changed from 0 to 100

Thanks for your votes

#5 Updated by Blatti Yves almost 4 years ago

  • Status changed from Resolved to To merge
  • Assignee changed from Technical Committee to Integrators
  • Priority changed from Urgent to Normal

In my branch rev: 8824

#6 Updated by Van Hoecke Hélène almost 4 years ago

  • Status changed from To merge to Closed

#7 Updated by Van Hoecke Hélène almost 4 years ago

  • Target version set to 4.3.2

#8 Updated by Van Hoecke Hélène almost 4 years ago

  • Assignee deleted (Integrators)

Also available in: Atom PDF