Hi Team,
We would like to display task lists for different projects in tempo timesheet.
As of now we are using to list the tasks in Adaptive script runner using Rest end point.
Here is the JASON code that we are using below. We are not sure how to display the different projects for task details.
======================
import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegate
import groovy.json.JsonBuilder
import groovy.transform.BaseScript
import javax.ws.rs.core.MultivaluedMap
import javax.ws.rs.core.Response
@BaseScript CustomEndpointDelegate delegate
tempoWorkTask(httpMethod: "GET") { MultivaluedMap queryParams, String body ->
def callbackFn = queryParams.getFirst("callback")
def options = [
values: [
[
value:' '
],
[
key:"Administration[O]",
value:"Administration[O]"
],
[
key:"Bug Fixing[O]",
value:"Bug Fixing[O]"
],
[
key:"Coding[C]",
value:"Coding[C]"
],
[
key:"Data Conversion[O]",
value:"Data Conversion[O]"
],
[
key:"Data Management[O]",
value:"Data Management[O]"
],
[
key:"Design[C]",
value:"Design[C]"
],
[
key:"Documentation[O]",
value:"Documentation[O]"
],
[
key:"Enhancement Development[C]",
value:"Enhancement Development[C]"
],
[
key:"Installation Configuration[C]",
value:"Installation Configuration[C]"
],
[
key:"Meetings[O]",
value:"Meetings[O]"
],
[
key:"Others[O]",
value:"Others[O]"
],
[
key:"Project Planning[O]",
value:"Project Planning[O]"
],
[
key:"Reengineering[O]",
value:"Reengineering[O]"
],
[
key:"Report Development[C]",
value:"Report Development[C]"
],
[
key:"Research[O]",
value:"Research[O]"
],
[
key:"Support and Maintenance[O]",
value:"Support and Maintenance[O]"
],
[
key:"Testing[C]",
value:"Testing[C]"
],
[
key:"Training[O]",
value:"Training[O]"
]
]
]
def resp = """${callbackFn} ( ${new JsonBuilder(options).toPrettyString()} )""".toString()
return Response.ok(resp).build()
}