Skip to content

Copying a portfolio that has been previously copied and name truncated causes a name validation error #750

@eclarizio

Description

@eclarizio

Currently, copying a portfolio where the name is under the max character length, but the addition of "Copy of" pushes it over the max character length, we are truncating by adding "..." to the end. However, this causes an issue when trying to copy the portfolio again, because the comparison regex is trying to match by starting with "Copy of", but ending with whatever the original portfolio's name was, and not "...", so it doesn't think there's a match, and it attempts to create a portfolio with the same name as "Copy of".

It should instead correctly recognize that there is already an existing copy, and end up being "Copy (1) of" with an even slightly shorter name since we're adding 4 more characters that will push off part of the original name to be truncated. Likewise, if "Copy of" and "Copy (1) of" the existing truncated name exists, it should move to "Copy (2) of".

https://projects.engineering.redhat.com/browse/SSP-1560

@clacroix12 Tagging you since you worked on the first truncate story. 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions