In rally how to update customize field through Automation which is having drop down scenario - rally

Am trying to update customize field through scripts which is having drop down field.I tried updating by using type of the field(AllowedAttributeValue).
I have created a Query for this field with type mentioned above , but its giving null response. This field is similar to tags field, but its customize .
Please help me how to resolve this issue.
QueryRequest tagRequest = new QueryRequest("TypeDefinition")
tagRequest.setWorkspace("/workspace/")
tagRequest.setFetch(new Fetch("_refObjectName","ObjectID","StringValue"))
tagRequest.setQueryFilter QueryFilter("StringValue", "=", "nn"))
QueryResponse tagQueryResponse = restApi.query(tagRequest)

Related

Rally custom list query not working on string custom field

I have a custom field being added on user story (HierarchicalRequirement) level.
The WSAPI documentation shows the following details for the field:
c_CustomFieldName
Required false
Type string
Max Length 32,768
Sortable true
Explicit Fetch false
Query Expression Operators contains, !contains, =, !=
When trying to create a report using Custom List to identify user stories where this field is empty, I add (c_CustomFieldName = "") to the query.
And yet, the result shows rows where this field is not empty.
How can that be?
I tried querying on null, but it didn't work.
thx in advance
What you're doing should work- are you getting errors, or just incorrect data? It almost seems like it's ignoring your query altogether.
I tried to repro both with the custom list app and against wsapi directly and the following all worked as expected:
(c_CustomText = "") //empty
(c_CustomText = null) //empty
(c_CustomText != "") //non-empty
(c_CustomText != null) //non-empty
It's possible you're running into some weird data-specific edge case in your data. It may be worth following up with support.

Computed many2many field dependencies in Odoo 10

I am trying to create a new field on the sale.order.line model. This field is called x_all_route_ids, and is meant to contain all of the available stock.location.route for an Order Line.
It should look up the product_id.route_ids and product_id.routes_from_categ_ids for the Order Line, and join them together into a single set of Routes.
I am trying to set this field up through the Odoo UI, but getting error related to my "Dependencies".
I have Dependencies defined as:
product_id, product_id.route_ids, product_id.routes_from_categ_ids
I have Compute defined as:
for record in self:
record['x_all_route_ids'] = record.product_id.route_ids
To start I am just trying to get the field to show the same value as product_id.route_ids, but it's not working. When I save, I get the following error:
Error while validating constraint
Unknown field u'product_id' in dependency u'product_id'
Any idea what I'm doing wrong here?
I was able to get this working. I think the issue was just a bug in the UI that came about because I had been trying so many different things. After refreshing the page, the following worked:
Dependency = product_id
Field type = many2many
Compute method:
for record in self:
full = record.product_id.route_ids | record.product_id.route_from_categ_ids
record['x_all_route_ids'] = full.filtered('sale_selectable')

Get Last Modified Date for a script Deployment in NetSuite

How do I get the last modified date of a deployment script? This can neither be searched with a saved Search nor it is available in the records browser.
Try getting it from a savedsearch by adding a column date/time.
Create a saved search on script deployment and see for date when you add columns.
You can load same search form script using var res = nlapiSearchRecord('scriptdeployment', 997, null, null);
or load record
var rec_id = record.getId();
var tb = nlapiLoadRecord('scriptdeployment', rec_id);

How to Get a data from a table and insert another table in YII form

I am newbe in YII. Apologies for simple and stupid question.
I messed up my system. In that Case I need your help to clear the concept :: my question is :::
How to Get a data from a table and insert another table in YII form ::::
means---> I want to get data and view in form field --> how can I do that ??
please help me out
Generate a model using gii. It will do all what you need and hopefully you can get the code for that.
localhost:2010/index.php?r=gii
Use Above changing your host and port to see Gii.
You have to Enable Gii in the Config file before doing this
$modelA = ModelA:;model()->find('somecondition');
$modelB= new ModelB();
$modelB->attribute1 = $modelA->attribute1;
$modelB->attribute2 = $modelA->attribute2;
$modelB->attribute3 = $modelA->attribute3;
$modelB->attribute4 = $modelA->attribute4;
$modelB->attribute5 = $modelA->attribute5;
$modelB->save();
Try this..

Cannot add new Workitems using TFS API

Hi I am trying to add new workitems to the TFS repository using the API, but when I validate the workitem before it is saved, it returns an error. I previously got exceptions regarding the field definitions for a bug namely, Symptom, Steps to Reproduce and Triage. (Error code TF 26027). The code snippet is shown below: Can anyone tell me what's wrong here?
switch (workItemType)
{
case "Bug":
{
workItem.Title = values["Title"].ToString();
workItem.State = values["State"].ToString();
workItem.Reason = values["Reason"].ToString();
workItem.Fields["Priority"].Value = values["Priority"].ToString();
workItem.Fields["Severity"].Value = values["Severity"].ToString();
//workItem.Fields["Triage"].Value = values["Triage"].ToString();
workItem.Fields["Assigned To"].Value = values["Assigned To"].ToString();
//workItem.Fields["Symptom"].Value = values["Symptom"].ToString();
//workItem.Fields["Steps to Reproduce"].Value = values["Steps to Reproduce"].ToString();
// Validate the Work Item fields.
ArrayList result = workItem.Validate();
// If any invalid fields are returned, report an error.
if (result.Count > 0)
MessageBox.Show("An Error occurred while adding the Bug to the repository.");
else
workItem.Save();
}
break;
To find the available field definitions, you can iterate over the collection (FieldDefinitions). The Name and ReferenceName properties are the values you can index by into the collection.
the Field "Symptom" cannot be empty
Just reading the error message it looks like you are defining a field called "somefield" in your work item. I'm thinking that you have some old code hanging around elsewhere, maybe above the code snippet you posted, where you are defining a value for workItem.Fields["somefield"]
Old question, but hopefully helps someone. The field name is "Repro Steps"
.Fields["Repro Steps"].Value