Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52131

Allow setting ignoreAcceptLanguage from Java API

    XMLWordPrintable

Details

    Description

      Currently only the System Locale field is accessible publicly. But ignoreAcceptLanguage cannot be set without accessing private fields. E.g. example from: https://github.com/oleg-nenashev/demo-jenkins-config-as-code/blob/master/init_scripts/src/main/groovy/scripts/System.groovy

      println("--- Configuring Locale")
      //TODO: Create ticket to get better API
      PluginImpl localePlugin = (PluginImpl)Jenkins.instance.getPlugin("locale")
      localePlugin.systemLocale = "en_US"
      localePlugin.@ignoreAcceptLanguage=true
      

      Attachments

        Activity

          oleg_nenashev Oleg Nenashev created issue -
          oleg_nenashev Oleg Nenashev made changes -
          Field Original Value New Value
          Assignee Oleg Nenashev [ oleg_nenashev ]
          oleg_nenashev Oleg Nenashev made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          oleg_nenashev Oleg Nenashev made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]

          People

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: