[CONTEDIT-505] Logic to get the proper nodeName while creating a new story Created: 02/Feb/23  Updated: 02/Feb/23

Status: Open
Project: Content Editor
Component/s: None
Affects Version/s: 2.1.3
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Tu Bo Xuan Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Epic Link: AuthorX Maintenance
Team: AuthorX

 Description   

While creating a new story, users are not able to use url-slug to define the nodeName. Instead, the system always look at the title (if not null) to name for that node. By checking the code, we saw the logic force to use title only. Please clarify if we need a fix for that. 

 

 @Override

    protected void write() {

        Node item = valueContext.getSingleOrThrow();

        boolean isUntitledItem = item.isNew();

        form.write(item);

        datasource.commit(item);

        String jcrName = jcrNameContext.jcrName().nullableValue();

        boolean isBlank = jcrName != null && jcrName.length() == 0;

        if (isUntitledItem || isBlank) {

            updateNodeName(item);

        }

        datasourceObservation.trigger();

    }

 

Thanks.


Generated at Mon Feb 12 00:21:05 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.