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

Behaviours: setHidden,setLabel,setDescription do not work for the attachment field on the service desk portal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Done
    • 5.6.10.1-p5, 5.6.15, 5.7.0
    • 6.16.0
    • Behaviours
    • None
    • SR4J Sprint 89
    • 4.4

    Description

       

      The following behaviour methods do not work on the service desk portal for the attachments field.

      1. setHidden()
      2. setLabel()
      3. setDescription()

      setRequired also does not work but this is explained here  SRJIRA-3288 as a Jira limitation

      Steps to reproduce:

      1. Create a Service Desk (Customer Service) project
      2. Create a behaviour mapped to this service desk project and all request types
      3. Use an Initialiser script like this:
        import com.onresolve.jira.groovy.user.FieldBehaviours
        import org.apache.log4j.Logger
        import org.apache.log4j.Level
        import groovy.transform.BaseScript
        
        @BaseScript FieldBehaviours fieldBehaviours
        def log = Logger.getLogger(getClass())
        log.setLevel(Level.DEBUG)
        
        //control field that works
        getFieldById("description")
            .setLabel("My New Description Label here")
            .setDescription("This is a field descr")
            //.setHidden(true)
        
        //field that does not work
        getFieldById("attachment")
            .setLabel("My New Label")
            .setDescription("My New Description")
            .setHidden(true)
        
      4. Open a Request creation screen in the portal and none of the properties will be applied to the attachment field but you should see the description field is correctly altered. Uncomment ".setHidden()" to see that work as well
      5. If you map the same behaviour to the Software View. (i.e. not through the service desk portal), the attachment field can be correctly altered with behaviours.

      Additional side effects

      setFormValue() on description field will be failed to run when calling this particular the methods (via Portal view):

      getFieldById('attachment').setDescription('description')
      getFieldById("description").setFormValue('description')
      

      Attachments

        Activity

          People

            msiewruk Mariusz Siewruk [X] (Inactive)
            mclark Matthew Clark
            Votes:
            3 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: