Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-2142

Behaviours ignores multi user picker custom field

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Fixed
    • 4.3.15
    • 5.3.0
    • None
    • None
    • JIRA v7.*

    • 0.6

    Description

      Steps to reproduce

      0. Create a Multi User Picker custom field with name Multi User Picker
      1. Set up a behaviour for field Description
      2. Select writable
      3. Add a condition: except Current user in user custom field value Multi User Picker

      Result The description field remains writable even if the current user is part of the Multi User Picker field.

      Workaround

      Instead of setting the condition from the UI, script it. For example

      def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
      def description = getFieldById(getFieldChanged())
      
      def cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Multi User Picker")
      if (currentUser in underlyingIssue.getCustomFieldValue(cf)) {
          description.setReadOnly(true)
      } else {
          description.setReadOnly(false)
      }
      

      For more examples on how to create scripted conditions

      Attachments

        Activity

          People

            jechlin Jamie Echlin
            tbatagiannis Thanos Batagiannis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: