Create/Edit form will not mark Text fields 'dirty' even after edited when ScriptRunner Behavior modifies the field first.

XMLWordPrintable

    • 10.03
    • 1
    • Severity 3 - Minor

      Issue Summary

      If you have a ScriptRunner Behavior configured run on a field that populates text. If the user edits the default text added by ScriptRunner and the clicks outside of the Create/Edit screen, the screen closes without warning the user they will lose data. If you perform the same steps without ScriptRunner Behaviors enabled, the text field will warn when the data is modified and you click outside of the dialog window.

      Steps to Reproduce

      1. Add a ScriptRunner behavior that updates the value of a text field. Something like below should work:
        def field = getFieldByName('Description')
        field.setFormValue('new issue summary')
        
      1. Create an issue of the type that the Behavior should run upon
      2. Add additional text to the field (in the example above that would be the 'Description' field).
      3. Click outside of the Create Dialog screen. Notice there is no warning
      4. Remove the Behavior from the field
      5. Repeat steps 2, 3, and 4. Notice this time the warning will be presented about data loss

      Expected Results

      If the user modifies a field in the Create/Edit screen regardless of if ScriptRunner has added default data, it should still mark the field as dirty and warn the user of data loss.

      Actual Results

      The dialog will close and not warn the user that the data they entered will be lost.

      Workaround

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

            Assignee:
            Unassigned
            Reporter:
            Andy Rusnak
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: