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

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 4.3.15
    • Fix Version/s: 5.3.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      JIRA v7.*

    • Critical Points:
      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

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

              Dates

              Created:
              Updated:
              Resolved: