Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Display task lists for different projects in tempo time sheets

Aasha Kathamuthu March 13, 2019

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()
}

3 answers

2 accepted

0 votes
Answer accepted
Aasha Kathamuthu March 25, 2019

Susanne Barbara Götz - Susanne.

 

Currently we are displaying task details like coding, testing,reporting via tempotime sheet.

Here we are using JSON script. this task list is common for all projects. we would like to implement the same in Different projects.

we are using this code using adaptive script runner plug in -rest end point.

I have attached the same in all browsers. please take a look and help me in display this in different fields.

 

Regards,

Aasha.

Aasha Kathamuthu March 25, 2019

Susanne Barbara Götz - Susanne.

 

Currently we are displaying task details like coding, testing,reporting via tempotime sheet.

Here we are using JSON script. this task list is common for all projects. we would like to implement the same in Different projects.

we are using this code using adaptive script runner plug in -rest end point.

I have attached the same in all browsers. please take a look and help me in display this in different fields.

 

Regards,

Aasha.
Susanne Götz _Tempo_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 26, 2019

Hi @Aasha Kathamuthu ,

Please note that custom scripts for dynamic dropdowns are not within the Tempo support, but you can get information about this in the Tempo developers ecosystem on Slack.

To make the dropdown Project specific, you will need to pick up the Issue key of the selected Issue and determine from this information, which Project the Issue belongs to. 

You can then select which values should be available for each project by using a switch statement.

Regards,
Susanne

0 votes
Answer accepted
Aasha Kathamuthu March 21, 2019

@ Susanne Barbara Götz - could you please help on this?

Susanne Götz _Tempo_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 21, 2019

Hi @Aasha Kathamuthu ,

Can you please give us more information about the problem you encounter. 

The script you added can be used to populate a dynamic dropdown, but it is not "Project" specific ( it will show the same options, independent to which Project the selected issue belongs). 

You might want to check out our Tempo developer community on Slack where you can get assistance from Tempo developers and other users that are building with Tempo. To register, please go to https://www.tempo.io/developers

Regards,

Susanne

0 votes
Aasha Kathamuthu March 13, 2019

Nic Brough [Adaptavist] - could you please help on this?

Suggest an answer

Log in or Sign up to answer