As a user I want to be able to use Set Data macro to create / populate ArrayList types

Currently Set Data macro allows the following content types:

  • text

  • number

  • date

  • boolean

  • content

  • attachment

  • user

However, Scaffolding also stores data as java.util.ArrayList using List Data macro. As a user I want to be able to create lists using Set Data as well.

Detailed use case:

Scaffolding List Data with "Open, In Progress, Resolved" options is used to denote status of a Root Cause Analysis (RCA) document. The document and these options can be edited using Edit Scaffold button and form. However, to make the interaction easier for users, we want to provide a button to toggle these options. Currently this is done using Bob Swift's Run macro within which Set Data macro resides.

However, setting the value of the field via Set Data creates a class java.lang.String but setting the value of the field via Edit Scaffold creates a java.util.ArrayList which makes it difficult to Report on and creates stack trace errors when retreving the page via REST API:

<?xmlversion="1.0"encoding="UTF-8"standalone="yes"?><status><status-code>500</status-code><message>java.lang.String cannot be cast to java.util.List</message><stack-trace>java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List at net.customware.confluence.plugin.scaffolding.api.ScaffoldFormServiceImpl.handleArrayOfMacro( at net.customware.confluence.plugin.scaffolding.api.ScaffoldFormServiceImpl.getFormData( at net.customware.confluence.plugin.scaffolding.api.ScaffoldApiResource.getForm( at sun.reflect.GeneratedMethodAccessor4344.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke(

I need to be able to use set data in a way that creates a java.util.ArrayList class.

  • JJ O'Brien
  • Apr 30 2020
  • Needs review
Hosting platform Server
  • Attach files
  • +4