We added a new field to our UserStories yesterday. When I do a query for stories with the LookbackAPI and set fields = true, I see our old custom fields, but not the new one we just added.
How long typically does one have to wait to see new schema changes appear in the lookback API?
Of course, I cannot query against this new field which is what I really want to accomplish here.
Are you looking specifically at stories that you've set the field on? Adding a new field won't automatically add that field to all stories in the LBAPI - the new field will only show on those stories that get updated to include a value for the new field.
Related
Deleting an item from a collection, which has a status field, through the UI or API results in the item being soft deleted. However, in this one particular instance, we want to remove it from the database entirely.
If not possible, can it safely be done through the database by just deleting it from the table carrying the name of the collection? Any side-effects when doing it this way?
Found the answer on this page https://v8.docs.directus.io/guides/status.html#soft-delete:
When deleting an item, the API does the following:
Check if the collection has a status field
Check if the delta data has the status field (meaning the status was changed)
Check if the new status value (from delta data) has soft_delete = true
If yes, it sets the action to SOFT_DELETE
If no, it hard deletes the item (permanently removed from the database)
I need a new field inside Contact model that would hold information about Allowed companies of the related user.
Now there is only field about Currently picked company by that user (and it is not enough for me to make a record rule).
The field I want to copy values from is inside model Users and it is called company_ids.
I’m trying to add this field in the developer mode (Settings > Technical > Fields) like this:
But I’m having trouble with code that would fill my field with values from the another model.
for record in self:
record[("x_company_ids")] = env['res.users'].company_ids
I’m guessing that the record is referring to a record inside Contact model and it does not contain fields from another models like Users. So I can’t figure it out how to reference a field from another model.
Something similar to this: env['res.users'].company_ids?
It is even harder for me because it is many2many field and should always update when the source changes.
Maybe better solution would be to use Automatic action to write values to this field?
I saw some threads like this: Computed many2many field dependencies in Odoo 10.
But it seems like in those cases they had clear connection between the fields and I don't have it. I don't know how to get related user while I'm inside Contact model. I know only how to this oposite way (from user to contact): user.partner_id.id
Here in below given code you haven't specified related user from which you will get company_ids, you have directly accessing company_ids
for record in self:
record[("x_company_ids")] = env['res.users'].company_ids
You can write as following :
for record in self:
record["x_company_ids"] = self.env['res.users'].search([('partner_id','=',record.id)]).company_ids
I want to find all "orphaned" user stories in Rally, where a user story does not belong to any feature. I know I need to set filter to((PortfolioItem = null) AND (Parent = null)) but where do I do that? Where do I start?
Forgive my ignorance, I am new to Rally
You have a bunch of options: the Work Views page or a custom list app are both decent places to start. Both of those apps have filters where you should be able to select a filter for Parent = -- No Entry --
To select the orphaned user stories, the below steps while tracking every iteration status would help,
Add Filter on field 'Feature'
In the filter for 'Feature', choose the value '-- No Entry --'
This would give you the list of user stories which are not linked to a parent feature in the respective iteration
I am trying to get a snapshot of deleted userstory to get value for a custom field(c_Dep). I get the snapshot but the custom field is empty. It had value in it. Does lookback not save value for cutomer created cutom field?
findConfig: {
_TypeHierarchy: 'HierarchicalRequirement',
"ObjectID": 12345,
"_ValidFrom": {
"$lte": "2017-01-25T19:00:57.475Z"
}
Sarita, It is hard to tell from the information you have given what is going on precisely. However, I can give you some pointers
The Lookback API will store changes in values for custom fields. The selection you have shown is valid from 24thJan to 25thJan. During this period was the custom field set? Probably not, because the array is only one long and I think it is showing the creation event.
Was the custom field updated to contain something after this time period?
The reason for asking is that a common misunderstanding is that the records stored in the lookback database will hold the current value of fields - it doesn't. It holds the changes in fields. If c_Dependencies didn't change during that time period, you may not see an entry returned in the array. The next entry in the database might be the record where the c_Dependencies field was set (changed from null to something) and that might be 'after' your time period filter.
It looks like your query is requesting snapshots earlier than 2017/1/25 ($lte). Since there's only one, it's probably the creation snapshot. If you get all snapshots for the ObjectID by removing the _ValidFrom parameter, you should see the changes made to c_Dep after artifact creation.
As I am not allowed to comment, I have to post a new answer.
I think William Scott meant remove the ValidTo filter. The one you have is the creation change. The update will be afterwards.
Is it possible to get a field's history (if it exists) for a field in an array or something of that sort in selenium? For example, user id field, I can see all IDs that have been used so far.
The purpose I'd like to use this is quickly create new IDs that haven't been used before. For example testID45 is already taken, so I'll use testID46 to create a new one. It's a lazy way to fill out a form without keeping track of the taken IDs.
I don't fully understand why you want to create IDs using Selenium. If you would post more info on what problem you are trying to solve, I could try to provide a better answer.
If you want to pull the IDs from existing elements you could do something like this. This finds all INPUT elements that have an ID specified and writes out the IDs. You could parse the IDs and then determine which ID to use next. I wouldn't recommend this because it would be faster to just generate a new ID that will be unique but maybe you need this for some reason.
List<WebElement> ids = driver.findElements(By.cssSelector("input[id]"));
for (WebElement id : ids)
{
System.out.println(id.getAttribute("id"));
}
I would recommend generating a new ID of your own format that would be unique on the page. This should be good enough for your purposes.
Random rnd = new Random();
String id = Long.toHexString(rnd.nextLong());
System.out.println("testID-" + id); // e.g. testID-cb8e7bac29ec7c7a
There are many other methods of generating strings in this post that you can reference also.