script runner code not giving expected results

TesterAnees November 29, 2017

Hi Team ,

 

I have a requirement to  fetch tempo work attribute (Activity-Static drop down) value.

I need to extract time entered on issues only against value "Review" in activity drop down.

Log work tab 

Worked     Description    Activity

2 hrs          test 1             Review

3 hrs          test2              Code

 

so i need to fetch activity value and compare it with string " Review".

If activity value is review i need to fetch logged time (2 hrs).

 

To start with how to fetch work attribute i am following  

https://scriptrunner.adaptavist.com/latest/jira/plugins/working-with-tempo.html

documentation.

I have implemented exactly similar structure and running same code.

Over time     hours

Checked       3hrs

unchecked   5 hrs

document claims that script code will return " 3 hrs" whenever overtime is checked.but when i am running it is giving me sum of all

 

Note : My requirement is to fetch time logged against activity value "review" in .groovy script to generate report using PDF view plugin.

I am not very sure about how to do it in .groovy so starting with implementing in script runner.

 

 

Additionally it will be great help if any one could send me script runner code to  fetch activity value and compare it with string. 

Activity values can be Review,Code,Design etc but i need to fetch time which is logged against activity "Review"

Log Work.png

Please advise

 

Thanks,

Anees Sultana

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events