Uploaded image for project: 'Jira Service Management Cloud'
  1. Jira Service Management Cloud
  2. JSDCLOUD-12479

JMWE workflow validator on Assets (formerly Insight) objects does not work with on workflow transitions

XMLWordPrintable

    • 16
    • Minor
    • 96
    • Hide

      Thanks everyone for indicating the importance of this ticket and providing context around your use cases.

      We are happy to say that we've just rolled out the fix that this ticket refers to: specifically, Assets field values are now correctly populated in Jira Expressions for all transitions (create issue and transition issue screens). This should fix custom validators built using JMWE that refer to Assets custom fields, as well as any other apps that make use of Jira Expressions on transitions.

      We notice that there is also a desire for a more powerful piece of functionality here, which is being able to determine more details about the Assets field values during workflow transitions (currently we only provide the object ID via Jira Expressions). We've created a new feature request ticket here to track that: https://jira.atlassian.com/browse/JSDCLOUD-14790 If that's something you're interested in, please vote!

      Show
      Thanks everyone for indicating the importance of this ticket and providing context around your use cases. We are happy to say that we've just rolled out the fix that this ticket refers to: specifically, Assets field values are now correctly populated in Jira Expressions for all transitions (create issue and transition issue screens). This should fix custom validators built using JMWE that refer to Assets custom fields, as well as any other apps that make use of Jira Expressions on transitions. We notice that there is also a desire for a more powerful piece of functionality here, which is being able to determine more details about the Assets field values during workflow transitions (currently we only provide the object ID via Jira Expressions). We've created a new feature request ticket here to track that: https://jira.atlassian.com/browse/JSDCLOUD-14790  If that's something you're interested in, please vote!

      Summary

      JMWE workflow validator on Assets objects does not work on Create issue or transition screens.

      Steps to Reproduce

      Create issue transition

      1. On the create transition add the Field Required Validator (JMWE app) on the Insight object custom field
      2. Try to create an issue with a valid object and try to perform the other transition with the same validator
        OR
      3. On the create transition add the following Jira expression to the custom JMWE script validator :
        issue.customfield_10249[0].objectId == "234"
        
      4. Set the value of the Assets custom field to the Object that should pass the validation
      5. Press the create button on the issue

      Transition screen

      1. Add Assets custom field to transition screen
      2. Associate the screen with a workflow transition
      3. Set the JMWE validator to fail validation if the Object id matches 234
      4. Create a new issue and set the Assets field to the Object 234, which should fail validation
      5. Trigger the transition that uses the screen configured earlier
      6. Change the value of the Assets custom field during the transition to a different Object, ie with id 456

      Expected Results

      The validators work fine in both the scenarios on Create transition as well as the rest of the transitions in the workflow

      Actual Results

      The validators do not work fine with the Create transition or during the transition. The validator will continue to throw an error indicating either a field has not been set (Create issue) or the value is incorrect (transition). This occurs because the Jira expression within the validator is unable to retrieve the current value set and fall back to retrieving the value set in the database.

      Workaround

      Try to use the Jira validators with Insight custom field on the Create transition.

              90325da67d46 Mohamed Hassan
              skahol Swati Kahol (Inactive)
              Votes:
              107 Vote for this issue
              Watchers:
              73 Start watching this issue

                Created:
                Updated:
                Resolved: