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
Published 8 hours ago in Jira Ops

Jira Ops Early Access Program Update #5: Three new ways to get a live Jira Ops demo!

Welcome to your weekly Jira Ops Early Access program update, where we’re sharing news and updates on Jira Ops progress as we work toward our 1.0 release. If you ever want to drop us feedback or ideas...

22 views 0 1
Read article

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