I'm looking to calculate Cycle Time based on InProgressDate to Completed Date and not the Accepted Date. Our Accepted state is driven by our User Acceptance process which sometimes takes longer than we'd like. I don't see a CompletedDate on the HierarchicalRequirement but perhaps I am missing it.
Am I missing the CompletedDate or should I possibly be looking for this in the Lookback API?
You are correct that there is no such field as CompletedDate on stories.
Here is a Lookback API query that looks for stories that went trough In-Progress to Completed within the dates specified:
https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/1111/artifact/snapshot/query.js?find={"_TypeHierarchy":"HierarchicalRequirement","Children":null,"ScheduleState":"Completed","_PreviousValues.ScheduleState":"In-Progress",_ValidFrom: {$gte: "2013-06-01TZ",$lt: "2013-09-01TZ"}},sort:{_ValidFrom:-1}}&fields=["ScheduleState","_PreviousValues"]&hydrate=["_PreviousValues","ScheduleState"]&pagesize:20
Here is a fragment of returned results:
TotalResultCount": 39,
"StartIndex": 0,
"PageSize": 100,
"ETLDate": "2013-09-17T03:35:02.819Z",
"Results": [
{
"ScheduleState": "Completed",
"_PreviousValues": {
"Owner": null,
"ScheduleState": "In-Progress"
}
Related
OK so I have been banging my head at this problem for way too long by now.
I want to sync stock levels of a product that is tracked with lots between the webshop and Odoo. For this reason I need to be able to make a stock adjustment of a lot via the API (in this case in python).
I have found this possible way of doing it:
odoo(
'stock.move',
'create',
[{
"name": "Webshop stock adjustment",
"company_id": 1,
"location_id": 8, # warehouse
"location_dest_id": 14, # virtual location
"product_id": batch["product_id"][0],
"product_uom": 1,
"lot_ids": [batch["id"]], # I am searching for the id by the lot name beforehand
"product_uom_qty": 1,
"quantity_done": 1,
"state": "done"
}]
)
This, however, results in two moves! One move which has the correct lot, and another one without a specified lot. The latter move is faulty of course, as the product is tracked with lots. This results in a fault lot entry, where I can't change the quantity by hand, as the field is invalid. Worse, it results in wrong stock levels.
You can see the problematic bookings here
I have tried to just create a stock.move.line, like so:
odoo(
'stock.move.line',
'create',
[{
"company_id": 1,
"display_name": "Webshop adjustment", # does not appear
"location_id": location_id,
"location_dest_id": location_dest_id,
"product_id": batch["product_id"][0],
"product_uom_id": 1,
"lot_id": batch["id"],
"product_uom_qty": quantity,
"qty_done": quantity,
"state": "done" # has no effect
}]
)
However that results in a line with no effect: Line
I have also tried to find the stock adjustment wizard, but the only one I found in the code as opposed to the UI, doesn't have a field for lots..
I'd be happy for any input on how to solve this problem!
Meanwhile I managed to solve this problem reliably. I needed to implement a function for that, rather than mucking around with the external API.
The function here is expecting vals with the format below. It reduces whatever batch needs to go first.
[{
'sku': sku,
'qty': quantity
},]
#api.model
def reduce_lots(self, vals):
log(vals)
for product_req in vals:
product = self.env['product.product'].search(
[['default_code','=', product_req['sku']]]
)
if len(product) == 0:
continue
lots = self.env['stock.quant'].search(
['&',('product_id', '=', product[0]['id']),('on_hand', '=', True)],
order='removal_date asc'
)
move = self.env['stock.move'].create({
'name': product_req['order'],
'location_id': 8, # Our Warehouse
'location_dest_id': 14, # Virtual Location, Customer. If you need to increase stock, reverse the two numbers.
'product_id': product.id,
'product_uom': product.uom_id.id,
'product_uom_qty': product_req['qty'],
})
move._action_confirm()
move._action_assign()
product_req['lots'] = []
for line in move.move_line_ids:
line.write({'qty_done': line['product_uom_qty']})
product_req['lots'].append({
'_qty': line['product_uom_qty'],
'_lot_id': line.lot_id.name,
'_best_before': line.lot_id.removal_date
})
move._action_done()
return vals
Are Heart Points available in the REST API for reading? IF so, how do we get to them? I'm not seeing the documentation data. Thanks.
Eric
You should use the Users.dataSources.datasets API endpoint. You can grab the hearts points merged from all data points by querying the dataSourceId "derived:com.google.heart_minutes:com.google.android.gms:merge_heart_minutes". It returns a JSON object with an array called "points". You'll find each heart point in that list and if you drill down further for each heart point you'll get the derived source.
The endpoint takes the form:
https://www.googleapis.com/fitness/v1/users/me/dataSources/dataSourceId/datasets/datasetId
Replace the following in the URL above:
dataSourceId: derived:com.google.heart_minutes:com.google.android.gms:merge_heart_minutes
datasetId: The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers.
Expanding on WiteCastle's answer, this datasource will provide you with the heart points.
"derived:com.google.heart_minutes:com.google.android.gms:merge_heart_minutes"
You will need to specify a timeframe denoted by the datasetId parameter which is a start time and and an end time in epoch time with nanoseconds format, e.g.:
1607904000000000000-1608057778000000000
The json response includes an array of points, essentially each time the sensor detected the user's activity. The 'heart points' are accessible within each point's "fpVal". Example of a point is below:
{
"startTimeNanos": "1607970900000000000",
"endTimeNanos": "1607970960000000000",
"dataTypeName": "com.google.heart_minutes",
"originDataSourceId": "derived:com.google.heart_rate.bpm:com.google.android.gms:merge_heart_rate_bpm",
"value": [
{
"fpVal": 2, <--- 2 heart points recorded during this activity
"mapVal": []
}
],
"modifiedTimeMillis": "1607976569329"
},
To get the heart points for today, specify the timeframe (00:00-23:59 in epcoch format), then loop through each point adding up all the "fpVal" values.
I'm trying to enable drill-ins for measures which are specified as "previous period" or "same period last year" of another measure. When a drill event is fired, the intersection I get looks like this:
[
{
id: 'fkdljsfkdljfdkslj_pop',
title: 'Constituents',
header: {uri: '/gdc/md/projectid/obj/12345', identifier: 'ahdueom'}
},
{
id: '54321',
title: 'Oct/FY2018,
header: {uri: '/gdc/md/projectid/obj/6789', identifier: 'constituentdateadded.month.short'}
}
]
What I want to do is use this information to call getValidElements (/gdc/app/projects/projectid/executeAfm/debug) to get the items involved in this drill event using the first intersection element as a metric and the second as an attribute filter. However, if I want to get the items for the previous period or the same period last year I need a different attribute filter.
Is there any endpoint that I can call to get the attribute filter which corresponds to the same period last year (in this example 'Oct/FY2017') or the previous period ('Sep/FY2018')?
Maybe you could use relative date filter in AFM to simulate previous period. Documentation is here https://sdk.gooddata.com/gooddata-ui/docs/filter_visual_components.html#relative-filter-examples
If whis won't help you, could you please specify more your use case - what exactly you want to achieve?
This should be a very simple one (been searching for a solution all day - read a thousand and a half posts).
I put a test row in my HBASE table in hbase shell:
put 'iEngine','testrow','SVA:SourceName','Journal of Fun'
I can get the value for a column family using the REST API in DHC Chrome:
https://ienginemaster.azurehdinsight.net/hbaserest/iEngine/testrow/SVA
I can't seem to get it for the specific cell: https://ienginemaster.azurehdinsight.net/hbaserest/iEngine/testrow/SVA:SourceName
{
"Row": [{
"key": "dGVzdHJvdw==",
"Cell": [{
"column": "U1ZBOlNvdXJjZU5hbWU=",
"timestamp": 1440602453975,
"$": "Sm91cm5hbCBvZiBGdW4="
}]
}]
}
I get back a 400 error.
When successfully asking for just the family, I get back:
I tried replacing the encoded value for SVA:SourceName, and a thousand other things. I'm assuming I'm missing something simple.
Also, the following works:
hbase(main):012:0> get 'iEngine', 'testrow', 'SVA:SourceName'
COLUMN CELL
SVA:SourceName timestamp=1440602453975, value=Journal of Fun
1 row(s) in 0.0120 seconds
hbase(main):013:0>
I opened a case with Microsoft support. I received confirmation that it is a bug (IIS and the colon separator not working). They are working on a fix - they are slightly delayed as the decide on the "best" way to fix it.
I am using google custom search API for searching a site and trying returning the maximum possible results by setting the num param to some high number 999 but this is sending error to me :
(400) Invalid Value
But when i set num value to 10 or lower it works perfectly, So it seems like google is putting some limit on returned results.
Here is my Google CSE link you can check by setting the num param
Google CSE API docs are here : API Docs
Any idea guys?
you can retrieve max 10 page with max 10 results.
in query you can use 'num' and 'start' params to lead your request.
num = 1-10 how many results to show
start = 1-100 the starting point
So, if you need max results, you must to do 10 request with num = 10 (default) and start = 1, 11, 21, ... 91
"queries": {
"nextPage": [
{
"title": "Google Custom Search - WTB rolex",
"totalResults": "3030",
"searchTerms": "WTB rolex",
"count": 10,
"startIndex": 11,
I think they want you to page through the result set. So, in this query, there are 3030 results and we're on page 1.
You can use the following parameters to specify which page you want:
"start": integer
It works, although I'm getting random 400s from it too (anything over 100 400s for me).