Workflow validators results in error when renaming class names instead of keys

XMLWordPrintable

    • 7.07
    • Severity 3 - Minor

      Issue Summary

      When Smart Attachments vendor was refactoring their app, they encountered an issue with workflow validators. They renamed class names for their validators and conditions and looks like Jira uses class names instead of the keys as when they did the update the validators failed to operate:

      <workflow-validator key="category-is-not-empty-validator" i18n-name-key="attach.cat.workflow.validator.category-is-not-empty"
      class="com.stiltsoft.jira.attachcategory.workflow.validators.CategoryNotEmptyImpl">
      <description key="attach.cat.workflow.validator.category-not-empty.description"/>
      <validator-class&gt;com.stiltsoft.jira.attachcategory.workflow.validators.CategoryNotEmpty</validator-class&gt;
      <resource type="velocity" name="view" location="/vm/validators-conditions/category-not-empty-view.vm"/>
      <resource type="velocity" name="input-parameters" location="/vm/validators-conditions/category-not-empty-edit.vm"/>
      <resource type="velocity" name="edit-parameters" location="/vm/validators-conditions/category-not-empty-edit.vm"/>
      </workflow-validator>
      

      Steps to Reproduce

      1. Clone https://bitbucket.org/Vinceal/rename-workflow-item/src
      2. Start Jira 7.7.0
      3. Create "Process Management" project
      4. Install SmartAttachements 1.17.4
      5. Activate SmartAttachments in project and add categories
      6. Edit project workflow and add validator "Category Not Empty" on Create of an issue
      7. Upgrade to SmartAttachements 1.18.0
      8. Try to create an issue

        Recording: Jira validator class name.mp4

      Expected Results

      Class name is not used, the key is used instead

      Actual Results

      Class name is use, The key is ignored.

      Workaround

      Use the old class name

            Assignee:
            Unassigned
            Reporter:
            Anne Calantog
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: