script runner code not giving expected results

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
Community showcase
Posted yesterday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

135 views 1 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you