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

Behavours API can't recognise translated language

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Trivial
    • Resolution: Done
    • 5.5.7.1-jira8
    • 6.1.0
    • None
    • None
    • 3.6

    Description

      Issue type field shows inconsistent issue types in Create Issue screen after language translated via User Profile. For example, using the code below:

      import org.apache.log4j.Logger
      import org.apache.log4j.Level
      def log = Logger.getLogger("Test0 koep")
      log.setLevel(Level.DEBUG)
      
      import com.atlassian.jira.component.ComponentAccessor
      import com.atlassian.jira.security.roles.ProjectRoleManager
      
      import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE
      
      def projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager)
      def allIssueTypes = ComponentAccessor.constantsManager.allIssueTypeObjects
      
      def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser
      def issueTypeField = getFieldById(ISSUE_TYPE)
      
      def remoteUsersRoles = projectRoleManager.getProjectRoles(user, issueContext.projectObject)*.name
      
      def availableIssueTypes = allIssueTypes
      log.debug allIssueTypes
      
      
      issueTypeField.setFieldOptions(availableIssueTypes)
      

      Steps to reproduce it

      1. Add the code above into initialiser behaviour config.
      2. Map a project with all issue types.
      3. Change language to German via User Profile

      Issues types has filter to shows bug and epic issue types only.

      Expected Behaviour

      It should show all issue types.

      Actual Behaviour

      It gets filters.

      Attachments

        Issue Links

          Activity

            People

              jechlin Jamie Echlin
              jloong John Chin Loong [X] (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: