• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 3.12.0, 4.18.0
    • Issue View

      Summary

      This behavior was noticed when using Issue Picker for Jira whereby the added field can be edited when using Edit button but cannot be edited using inline edit.

      Environment

      Steps to Reproduce

      1. Install Issue Picker for Jira plugin
      2. Create and configure an Issue Picker custom field as a single select. We can use JQL resolution is empty to get all issue or any other JQL as long as it displays a list of issues.
      3. Add the field to JSD screen.
      4. Visit one of the issues via view issue page in JIRA.
      5. Now try to use inline edit.

      Expected Results

      The field can be edited as the option to select the list in the field is available in the drop down.

      Actual Results

      Once we click inline edit and choose a new value the details are not saved

      Notes

      The developer for the plugin have tested the behavior and shared with us on their insight.

      1. Current design code in service desk seems like disabling the inline edit as shown below
        JIRA.bind(JIRA.Events.INLINE_EDIT_BLURRED, function() { AJS.log('blurred...'); console.trace(); });
        
      2. As soon as you try to open the select box in inline edit mode, the event is fired and inline edit mode is cancelled.
        The stacktrace shows that the minified JS of Jira Service Desk is what fires the event. The offending module is:
        /* module-key = 'com.atlassian.servicedesk.frontend-webpack-plugin:context-jira.view.issue', location = 'jira.view.issue.bundle.js' */

      Possible Solution

      Make sure only select2 fields with certain data- fields or CSS classes are used, so that JSD doesn't cancel editing for other fields. (courtesy of the plugin vendor)

      Workaround

      Currently, to edit the value of the field instead of using inline edit, users can use the edit button available in view issue page.

          Form Name

            [JSDSERVER-5777] JSD Javascript disbale Inline Edit for Select 2 field

            Yanshan added a comment - - edited

            Hi Atlassian Team,

            We hit the same problem too.

            if select2 can`t user,please give us another selectUI

            Yanshan added a comment - - edited Hi Atlassian Team, We hit the same problem too. if select2 can`t user,please give us another selectUI

            KC Wong added a comment - - edited

            Another victim here. Implemented a custom field type using select2, working fine for Jira issues but in Service Management issues inline edit mode does not play nice with select2. Using the select2 dropdown list will trigger closing of inline edit. 

            Major level, reported in 2018, still here in 2022. Really, Atlassian? Not even a workaround?

             

            I had to kill the blur event completely. In my edit Velocity template: 

            JIRA.bind(JIRA.Events.INLINE_EDIT_STARTED, function(e, context, reason) {
                JIRA.unbind(JIRA.Events.INLINE_EDIT_BLURRED);
            }); 

            The drawback is whenever the custom field type is present, user can no longer click outside of the inline edit to close it. They must click the check/cross buttons, press Esc or the shortcut keys. But inline edit works, select2 works. 

            Originally I wanted to cache the existing blur listeners, remove them on start of inline edit, and put them back when done. However the events are insufficient:

            1. On cancel, BEFORE_INLINE_EDIT_CANCEL is triggered. This one is fine. 
            2. INLINE_EDIT_SAVE_COMPLETE gets triggered after the edit template gets reloaded. This means the cached listeners in JavaScript will be gone. 
            3. INLINE_EDIT_BLURRED is also triggered on save, before the template reload. However, there is no data attached to distinguish it from the blur event from using select2. 

            KC Wong added a comment - - edited Another victim here. Implemented a custom field type using select2, working fine for Jira issues but in Service Management issues inline edit mode does not play nice with select2. Using the select2 dropdown list will trigger closing of inline edit.  Major level, reported in 2018, still here in 2022. Really, Atlassian? Not even a workaround?   I had to kill the blur event completely. In my edit Velocity template:  JIRA.bind(JIRA.Events.INLINE_EDIT_STARTED, function(e, context, reason) {     JIRA.unbind(JIRA.Events.INLINE_EDIT_BLURRED); });  The drawback is whenever the custom field type is present, user can no longer click outside of the inline edit to close it. They must click the check/cross buttons, press Esc or the shortcut keys. But inline edit works, select2 works.  Originally I wanted to cache the existing blur listeners, remove them on start of inline edit, and put them back when done. However the events are insufficient: On cancel, BEFORE_INLINE_EDIT_CANCEL is triggered. This one is fine.  INLINE_EDIT_SAVE_COMPLETE gets triggered after the edit template gets reloaded. This means the cached listeners in JavaScript will be gone.  INLINE_EDIT_BLURRED is also triggered on save, before the template reload. However, there is no data attached to distinguish it from the blur event from using select2. 

            Hi Atlassian Team,

            We hit the same problem too.

            I believe some JSD Javascript code that was intended for another screen is accidentally rendered on Issue View screen. Why would Jira close all Select2's?

            It's been more than a year since this was reported and this is some serious bug I think. Show some attention to this issue please.

            Emre Toptancı [OBSS] added a comment - Hi Atlassian Team, We hit the same problem too. I believe some JSD Javascript code that was intended for another screen is accidentally rendered on Issue View screen. Why would Jira close all Select2's? It's been more than a year since this was reported and this is some serious bug I think. Show some attention to this issue please.

              Unassigned Unassigned
              smanimaran Shan Sharma Manimaran (Inactive)
              Affected customers:
              12 This affects my team
              Watchers:
              12 Start watching this issue

                Created:
                Updated: