[jira] Created: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
SequenceNum for ProdAssocs when using QuickAddVariants
------------------------------------------------------

         Key: OFBIZ-51
         URL: http://issues.apache.org/jira/browse/OFBIZ-51
     Project: The Open For Business Project
        Type: Improvement

  Components: product  
    Versions: SVN trunk    
    Reporter: Scott Gray


Hi

The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.

Regards
Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-51?page=all ]

Scott Gray updated OFBIZ-51:
----------------------------

    Attachment: VarProdAssocSeqNum.patch

> SequenceNum for ProdAssocs when using QuickAddVariants
> ------------------------------------------------------
>
>          Key: OFBIZ-51
>          URL: http://issues.apache.org/jira/browse/OFBIZ-51
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: product
>     Versions: SVN trunk
>     Reporter: Scott Gray
>  Attachments: VarProdAssocSeqNum.patch
>
> Hi
> The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.
> Regards
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-51?page=all ]

Scott Gray updated OFBIZ-51:
----------------------------

    Attachment: VarProdAssocSeqNum-2.patch

Sorry that patch won't load properly, please use this one instead

> SequenceNum for ProdAssocs when using QuickAddVariants
> ------------------------------------------------------
>
>          Key: OFBIZ-51
>          URL: http://issues.apache.org/jira/browse/OFBIZ-51
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: product
>     Versions: SVN trunk
>     Reporter: Scott Gray
>  Attachments: VarProdAssocSeqNum-2.patch, VarProdAssocSeqNum.patch
>
> Hi
> The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.
> Regards
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-51?page=comments#action_12417627 ]

Scott Gray commented on OFBIZ-51:
---------------------------------

OK, i'm not having much luck with this, my patch isn't up to date i just realized so i'll go get some sleep and fix it tomorrow

> SequenceNum for ProdAssocs when using QuickAddVariants
> ------------------------------------------------------
>
>          Key: OFBIZ-51
>          URL: http://issues.apache.org/jira/browse/OFBIZ-51
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: product
>     Versions: SVN trunk
>     Reporter: Scott Gray
>  Attachments: VarProdAssocSeqNum-2.patch, VarProdAssocSeqNum.patch
>
> Hi
> The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.
> Regards
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-51?page=all ]

Jacopo Cappellato updated OFBIZ-51:
-----------------------------------

    Attachment:     (was: VarProdAssocSeqNum.patch)

> SequenceNum for ProdAssocs when using QuickAddVariants
> ------------------------------------------------------
>
>          Key: OFBIZ-51
>          URL: http://issues.apache.org/jira/browse/OFBIZ-51
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: product
>     Versions: SVN trunk
>     Reporter: Scott Gray
>  Attachments: VarProdAssocSeqNum-2.patch
>
> Hi
> The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.
> Regards
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-51?page=all ]

Scott Gray updated OFBIZ-51:
----------------------------

    Attachment: VarProdAssocSeqNum-final.patch

Ok, here's the final attempt: VarProdAssocSeqNum-final.patch

paths are relative, patch is up to date and there's no formatting changes

Thanks
Scott

> SequenceNum for ProdAssocs when using QuickAddVariants
> ------------------------------------------------------
>
>          Key: OFBIZ-51
>          URL: http://issues.apache.org/jira/browse/OFBIZ-51
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: product
>     Versions: SVN trunk
>     Reporter: Scott Gray
>  Attachments: VarProdAssocSeqNum-2.patch, VarProdAssocSeqNum-final.patch
>
> Hi
> The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.
> Regards
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-51?page=all ]

Jacopo Cappellato updated OFBIZ-51:
-----------------------------------

    Attachment:     (was: VarProdAssocSeqNum-2.patch)

> SequenceNum for ProdAssocs when using QuickAddVariants
> ------------------------------------------------------
>
>          Key: OFBIZ-51
>          URL: http://issues.apache.org/jira/browse/OFBIZ-51
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: product
>     Versions: SVN trunk
>     Reporter: Scott Gray
>  Attachments: VarProdAssocSeqNum-final.patch
>
> Hi
> The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.
> Regards
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-51?page=comments#action_12417664 ]

Jacopo Cappellato commented on OFBIZ-51:
----------------------------------------

Hi Scott,

even if I'm not sure to understand the usefulness of ordering the variants, I think that adding the sequenceNum as an optional input parameter to the "quickCreateVariant" service is fine.
But why changing the getVariantCombinations service to return that arbitrary sequence?
If you simply want to generate the sequence that reflects the same order of combinations returned by the service, wouldn't be better to generate a default sequence in the form of the QuickAddVariant.ftl (using a simple counter in the form)?

Jacopo

> SequenceNum for ProdAssocs when using QuickAddVariants
> ------------------------------------------------------
>
>          Key: OFBIZ-51
>          URL: http://issues.apache.org/jira/browse/OFBIZ-51
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: product
>     Versions: SVN trunk
>     Reporter: Scott Gray
>  Attachments: VarProdAssocSeqNum-final.patch
>
> Hi
> The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.
> Regards
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-51?page=comments#action_12417666 ]

Scott Gray commented on OFBIZ-51:
---------------------------------

Hi Jacopo

Sorting the variants allows for the display of the variant summary data in a logical sequence
ie. http://issues.apache.org/jira/browse/OFBIZ-46
as an apparel manufacturer, garment sizes displayed out of sequence would make little sense when viewed as a group.  Sequencing is already available for the product associations, this patch just applies some default values to them.

The reason for altering the service was that I thought I needed to try and maintain separation between the data and the template.  It seemed logical that if thats where the variant's productId came from, the sequenceNum came from there as well.  Whatever you think is best is fine by me.

I had asked on the dev list about using the rowCount of the multi form to generate the sequenceNum parameter but Si thought this was a bad idea (although after reading his comment again I'm wondering if I have misunderstood)
http://mail-archives.apache.org/mod_mbox/incubator-ofbiz-dev/200606.mbox/%3c449C521F.4050008@...%3e

Regards
Scott

> SequenceNum for ProdAssocs when using QuickAddVariants
> ------------------------------------------------------
>
>          Key: OFBIZ-51
>          URL: http://issues.apache.org/jira/browse/OFBIZ-51
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: product
>     Versions: SVN trunk
>     Reporter: Scott Gray
>  Attachments: VarProdAssocSeqNum-final.patch
>
> Hi
> The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.
> Regards
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-51?page=comments#action_12417668 ]

Jacopo Cappellato commented on OFBIZ-51:
----------------------------------------

Scott,

in svn r. 7861 I've committed a slightly modified patch for the first part of your work (patch for the quickAddVariant service).
Now it is possible to assign a sequenceNum to the variants. Thanks for this.

About the second part, I'd like to better understand Si's comments: Si can you help us with this?

In my opinion adding a new input field (not an hidden one) to the quickAddVariants' form, so that the user can optionally specify a sequence num for the new variants would be a more flexible approach; if we want to prepopulate the sequenceNum's input fields with a default value I think it's better to do this inside the ftl template (instead of inside a service): in this way it will be easier to customize (for example if you want sequences like 1,2,3.. or 10, 20, 30..).

Jacopo

> SequenceNum for ProdAssocs when using QuickAddVariants
> ------------------------------------------------------
>
>          Key: OFBIZ-51
>          URL: http://issues.apache.org/jira/browse/OFBIZ-51
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: product
>     Versions: SVN trunk
>     Reporter: Scott Gray
>  Attachments: VarProdAssocSeqNum-final.patch
>
> Hi
> The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.
> Regards
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-51?page=comments#action_12417742 ]

Scott Gray commented on OFBIZ-51:
---------------------------------

Hi Jacopo,

I had considered displaying a user input on the form, but i wasn't sure if it would be of general enough use to include, but i suppose if people are using virtual products then it follows that they may also like to sort those products.

Unless Si has opinions on this, I'll go ahead and redo the second part of the patch to add a user input and prepopulate it from the the ftl.

While i'm at it and perhaps not for this patch, the create "virtual from variant" part of the screen doesn't seem very user friendly.  I might tidy it up which may allow for more room on the main form.

Regards
Scott

> SequenceNum for ProdAssocs when using QuickAddVariants
> ------------------------------------------------------
>
>          Key: OFBIZ-51
>          URL: http://issues.apache.org/jira/browse/OFBIZ-51
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: product
>     Versions: SVN trunk
>     Reporter: Scott Gray
>  Attachments: VarProdAssocSeqNum-final.patch
>
> Hi
> The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.
> Regards
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-51?page=all ]

Scott Gray updated OFBIZ-51:
----------------------------

    Attachment: QuickAddVariantsSeqNum.patch

Hi Jacopo

Here's the patch for the ftl to include a seqNum field.  I've prepopulated it automatically, not sure if this is the best approach or whether I should only be populating the field when the checkbox is selected, but it seemed like a lot more work and wasn't sure if there was any real benefit.

I went for the 10,20,30 etc numbering as it makes more sense than 1,2,3.

Thanks for your help with this
Scott

p.s. Did you see my email questioning multiple variants for the same features?
http://mail-archives.apache.org/mod_mbox/incubator-ofbiz-dev/200606.mbox/%3c449FAB20.3010703@...%3e
Can you shed any light on this?

> SequenceNum for ProdAssocs when using QuickAddVariants
> ------------------------------------------------------
>
>          Key: OFBIZ-51
>          URL: http://issues.apache.org/jira/browse/OFBIZ-51
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: product
>     Versions: SVN trunk
>     Reporter: Scott Gray
>  Attachments: QuickAddVariantsSeqNum.patch, VarProdAssocSeqNum-final.patch
>
> Hi
> The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.
> Regards
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-51?page=comments#action_12417997 ]

Scott Gray commented on OFBIZ-51:
---------------------------------

I missed something in the patch:
<#assign columns = featureTypes.size() + 3>
needs to be + 4

I can submit a new patch if need be, sorry about that

> SequenceNum for ProdAssocs when using QuickAddVariants
> ------------------------------------------------------
>
>          Key: OFBIZ-51
>          URL: http://issues.apache.org/jira/browse/OFBIZ-51
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: product
>     Versions: SVN trunk
>     Reporter: Scott Gray
>  Attachments: QuickAddVariantsSeqNum.patch, VarProdAssocSeqNum-final.patch
>
> Hi
> The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.
> Regards
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-51) SequenceNum for ProdAssocs when using QuickAddVariants

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-51?page=all ]
     
Jacopo Cappellato closed OFBIZ-51:
----------------------------------

    Resolution: Fixed

Thanks Scott,

I have committed your last work in svn with rev. 7876


> SequenceNum for ProdAssocs when using QuickAddVariants
> ------------------------------------------------------
>
>          Key: OFBIZ-51
>          URL: http://issues.apache.org/jira/browse/OFBIZ-51
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: product
>     Versions: SVN trunk
>     Reporter: Scott Gray
>  Attachments: QuickAddVariantsSeqNum.patch, VarProdAssocSeqNum-final.patch
>
> Hi
> The attached patch inserts values in the sequenceNum field on the Variant -> Virtual product associations when using the Quick Add Variants screen.  The sequenceNum is generated in the same order as the feature combinations displayed on screen, this seems to be the best way to sequence the ProdAssocs by default and certainly (in my case at least) beats no default sequencing.
> Regards
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira