Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-9272

Algorithm to rename existing nodes

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.8.0
    • 3.8.4, 4.1.3
    • Général
    • None
    • 1 - Middle term
    • 1 - Easy

      The algorithm used to rename the name of a content which is already used is like this :

      • Suffix the name by "-2"
      • If the original name with the suffix "-2" is already used, try with "-3"
      • Etc.

      But when we create a content by copy, the name already exists, and we add the suffix "-2". And if we copy the content copy, if have twice "-2", etc.

      Then, you can have name with "-2" many times. I don't know if there is a limit in JCR names, but I think it should be smarter if we detect an eventually existing prefix and increment it.

      For example :
      septembre-2014-actualite-5-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-3-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-3-2-2-shared

      You can already see the suffix "-shared" for this content. And because of the copy, I don't think the current content is a news of september 2014...

            Unassigned Unassigned
            bmaurel Bérénice Maurel
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: