0

Sum of calculation units per match rate for all CAT tool projects (month, year etc.)

Peter Kolar 12 months ago updated by Bartosz Gumuła (XTRF Deployment & Training Specialist) 12 months ago 8

Hi,

Is there any way I could get a sum of all calculation units for all CAT tool projects in a period of a month or even a year? I need the information by match rate, so how many 101% units, how many 100, 85-99% etc. Any ideas?

Kind regards,

Peter

Perhaps someone with more knowledge in Virtual Columns and Java might help,

I thought about how I could go around doing this and I figure that  I could simply create a Virtual Column that would display 100% matches for a start. The getPercent100 method does not work for me for some reason, it keeps returning null. But the getPercent100Rate works just fine for example. What am I doing wrong? Any tips on how to solve this particular case?

#set( $tmpwordcount = 0)
#set($taskFinance = ${utils.unwrap($this).getProjectFinance()})
#foreach( $receivable in $taskFinance.getCatReceivables() )
#if($receivable.getCalculationUnit().getSymbol() == "sw")
#set( $tmpwordcount = $tmpwordcount + $receivable.getPercent100Rate())
#end
#end
$tmpwordcount

Kind regards,

Peter

If I use your code, it does work.
Maybe you could add some extra debugging. Try something like this, maybe you can spot the error in your case:


Class, should be Task: $utils.unwrap($this).class
#set($taskFinance = $utils.unwrap($this).getProjectFinance())
Amount receivables: $taskFinance.getCatReceivables().size()
#foreach( $receivable in $taskFinance.getCatReceivables() )
Calculation unit symbol: $receivable.getCalculationUnit().getSymbol()
#if($receivable.getCalculationUnit().getSymbol() == "sw")
Percent 100 rate: $receivable.getPercent100Rate()
#end
#end

Hi Dennis, you are correct, I pasted the wronf code :) I need/ed help with the getPercent100 funtion which should return the quantity for 100% matches. Any idea on how to do that?


Kind regards,

Peter

+2

You could use this: Amount 100 rate: $receivable.getCATQuantity().getPercent100()


And for the other percentage quantities:

Great! That works, thank oyu very much Dennis!

Dear Peter, 

Have you tried getting this information from Business Reports? 

I am not sure what exact kind of information you are looking for but I think this could be useful.

Please let me know if there is anything I can help you with

Best regards,
Bartosz

Dear Bartosz,

Do not know how I missed that. I automatically assumed it would give me a sum off all matches not jus specific macthes. Thank you!

Kind regards,

Peter

Dear Peter,

I am glad it works for you and always happy to help!

Have a great day and week

Best regards,
Bartosz