Create From Template macro - spacekey cannot start with 0 (zero)

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      When we have a space starting with 0 (zero), the Create from template macro will generates a 400 error (bad request) if the space set is the one that starts with zero on the spacekey.

      Environment

      • Cloud
      • Both editing experiences

      Steps to Reproduce

      1. Create a space with the space key "007", for example;
      2. Create a page on this space and add a Create from template macro;
      3. Set any template, but let the spacekey set as 007;
      4. Save the macro and publish the page;
      5. Hit the create from template button.

      Expected Results

      You are redirected to the template you set.

      Actual Results

      The screen just hangs on a creation pop-up.

      Notes

      • When setting the spacekey in the Create from template macro, if you type 007, it will show a no results found message. However, if you type the space name, the space will be listed and, when clicking on the space name, the spacekey 007 is auto-filled in the field;
      • If you right-click over the create from template button and inspect it, it is possible to see that the buttons is correctly set:
        <button class="aui-button create-from-template-button conf-macro output-inline" data-space-key="007" href="https://INSTANCE_NAME.atlassian.net/wiki?createDialogSpaceKey=007&amp;createDialogBlueprintId=2b681b86-c745-4f9a-8302-2d116dbf6b55" data-content-blueprint-id="2b681b86-c745-4f9a-8302-2d116dbf6b55" data-hasbody="false" data-macro-name="create-from-template" data-macro-id="ee3eda4f-06d4-4d34-9bb9-0a4c3698c0f8" resolved="">Create from template</button>
      • However, the request URL is set to create the page in the spacekey 7:
        https://saitama.atlassian.net/wiki/rest/create-dialog/1.0/blueprints/web-items?spaceKey=7

        Open the network tab in the browser console and hit the create from template button to receive the 400 and see it.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            Assignee:
            Unassigned
            Reporter:
            Vinicius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: