Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-59691

JavaScript `Syntax error, unrecognized expression: option[value='-1'` when creating Jira issue

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 7.12.0
    • 7.2.0, 7.4.3, 7.4.4, 7.4.7, 7.5.1, 7.6.2, 7.10.2, 7.11.2
    • Integrations - Jira
    • None

      Issue Summary

      Javascript error when creating Jira issue from highlighted text

      Steps to Reproduce

      In Jira
      1. Create a project
      2. Create a custom field
      3. Assign this field to the project's all screens
      4. Make the custom field compulsory
      5. Make the built-in 'Description' field optional
      In Confluence
      1. Create a page with text
      2. Highlight text to create a Jira issue

      Expected Results

      Popup loads without any issue and user is able to create a Jira issue

      Actual Results

      Popup loads but Getting Required Fields loads indefinitely

      Error found from Developer Tools console

      onClick @ batch.js?healthcheck-resources=true&highlightactions=true&hostenabled=true&locale=en-US&user-logged-in=true:3151
      (anonymous) @ batch.js?healthcheck-resources=true&highlightactions=true&hostenabled=true&locale=en-US&user-logged-in=true:4373
      dispatch @ batch.js?locale=en-US:44
      v.handle @ batch.js?locale=en-US:44
      Show 51 more frames
      batch.js?locale=en-US:44 Uncaught Error: Syntax error, unrecognized expression: option[value='-1'
          at Function.re.error (batch.js?locale=en-US:44)
          at re.tokenize (batch.js?locale=en-US:44)
          at Function.re (batch.js?locale=en-US:44)
          at Function.c.find (batch.js?locale=en-US:64)
          at c.fn.init.find (batch.js?locale=en-US:44)
          at c.fn.init.c.fn.find (batch.js?locale=en-US:66)
          at i.<anonymous> (com.atlassian.confluence.plugins.confluence-jira-content:confluence-jira-content-resources.js?locale=en-US:284)
          at f (batch.js?locale=en-US:228)
          at i.trigger (batch.js?locale=en-US:228)
          at i._onModelEvent (batch.js?locale=en-US:228)
      

      Workaround

      Make description field compulsory

            [CONFSERVER-59691] JavaScript `Syntax error, unrecognized expression: option[value='-1'` when creating Jira issue

            A fix for this issue is available to Server and Data Center customers in Confluence 7.12.0
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Franco Skrzypczak (Inactive) added a comment - A fix for this issue is available to Server and Data Center customers in Confluence 7.12.0 Upgrade now or check out the Release Notes to see what other issues are resolved.

            Hello, this affects my team.

            Regards.

            Carlos Sierra Cantin added a comment - Hello, this affects my team. Regards.

            We have the same problem in Confluence 7.4.4 and we also have a high number of projects and the workaround is impossible to implement.

            João Ferreira added a comment - We have the same problem in Confluence 7.4.4 and we also have a high number of projects and the workaround is impossible to implement.

            Elliot Canfield added a comment - - edited

            In responses to ITB - We have the exact same issues

            • has followed us through 2 upgrades
            • Still persistent in Jira V8.5.9 & Confluence 7.4.4

            We are using the same workaround as mentioned by huangzhihui

            Considering we have over 800+ projects in our environment, building a new date field is not a valid solution - nor have we been able to trace the issue to any date field (removed all date fields from our test environment - issue still persists)

            Elliot Canfield added a comment - - edited In responses to ITB - We have the exact same issues has followed us through 2 upgrades Still persistent in Jira V8.5.9 & Confluence 7.4.4 We are using the same workaround as mentioned by huangzhihui Considering we have over 800+ projects in our environment, building a new date field is not a valid solution - nor have we been able to trace the issue to any date field (removed all date fields from our test environment - issue still persists)

            We have the same problem and get the same errors in Confluence 7.6.2. When we can expect a fix for that? 

            Kind Regards

            Elke Perner added a comment - We have the same problem and get the same errors in Confluence 7.6.2. When we can expect a fix for that?  Kind Regards

            huangzhihui added a comment - - edited

            We're experiencing this issue in Confluence 7.4.1, too. and we can workaround this issue by changing the task to any other type and switch back to the desired task type too.

            huangzhihui added a comment - - edited We're experiencing this issue in Confluence 7.4.1, too. and we can workaround this issue by changing the task to any other type and switch back to the desired task type too.

            ITB added a comment -

            We're experiencing this issue in Confluence 7.4.0, too. We do not have any custom date fields, and we can workaround this issue by changing the task to any other type and switch back to the desired task type.

            ITB added a comment - We're experiencing this issue in Confluence 7.4.0, too. We do not have any custom date fields, and we can workaround this issue by changing the task to any other type and switch back to the desired task type.

              zxu2@atlassian.com Zac Xu
              ppragasam@atlassian.com Puventhira Pragasam (Inactive)
              Affected customers:
              18 This affects my team
              Watchers:
              24 Start watching this issue

                Created:
                Updated:
                Resolved: