Details
-
Bug
-
Status: Done
-
High
-
Resolution: Done
-
5.6.10.1-p5, 5.6.15, 5.7.0
-
None
-
SR4J Sprint 89
-
4.4
Description
The following behaviour methods do not work on the service desk portal for the attachments field.
- setHidden()
- setLabel()
- setDescription()
setRequired also does not work but this is explained here SRJIRA-3288 as a Jira limitation
Steps to reproduce:
- Create a Service Desk (Customer Service) project
- Create a behaviour mapped to this service desk project and all request types
- 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)
- 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
- 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')