HP ALM Rest API - unable to update Custom column created under Test-Instance -> user Fields -> Comments - rest

I am trying to update custom column "Comments" created under Test-Instance -> User Fields --> Comments.
I am able to update columns which are under Test-Instance -> System fields using same code.
I am passing following payloads ->
1. payload giving issue:
PAYLOADCUSTOM = "%s%s";
payload working properly:
PAYLOADCUSTOM = "%s%s";
Basically i am able to update Status, Iteration fields but not comments field.
Any help is greatlly appreciated
ALM Screenshot:-

was using incorrect name. Custom names start as "user_01"
So correct payload was:-
PAYLOAD =
"<Entity Type="test-instance">
<Fields>
<Field Name="status"><Value>%S</Value></Field>
<Field Name="iterations"><Value>%s</Value></Field>
<Field Name="user-01"><Value>%s</Value></Field>
</Fields>
</Entity>";
Regards,
Vikram

Related

Change the state of hr.contract state

I would like to automate the process of changing the state of the contract based on the date, on the standard I found the function that updates the state but it didn't call in the model, but in the data file.
thank you in advance.
Odoo hr_contract module has scheduled action(cron) which call method update_state and this method is responsible for updating the status of the contract.
The scheduled action defined in hr_contract_data.xml as below:
<record id="ir_cron_data_contract_update_state" model="ir.cron">
<field name="name">HR Contract: update state</field>
<field name="model_id" ref="model_hr_contract"/>
<field name="type">ir.actions.server</field>
<field name="state">code</field>
<field name="code">model.update_state()</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
</record>
This action should be active by default and will be called every day and update the status of the contracts.
So you need to check if this scheduled action in your system is not active and activate it, you can do it in Odoo GUI as below:
Enable developer mode.
Go to Settings.
Go to Technical menu -> Scheduled actions.
Search for HR Contract: update state and open it.
In the right side of the form, If the Smart button showing off that's mean the action is not active and you can click on the button to switch it on. If the action is active but you found that it's not updating the contracts status so you need to check the Odoo log to see if there is any error related to this action.

How can I query delll boomi MDH field thats not in match rule?

I am new to MDH and I would like to know how to query MDH field directly thats not in match rules.
I have a model that has 5 fields (Src_id, name, email, updated_date, created_date) and we have a match rule on Src_id which is also ID in MDH.
But, I would like to search on name and get the Src_Id is it possible? if not, do I need to make any changes to my model
Any help is highly appreciated.
There are two avenues for "querying" your master data hub.
MDH Web UI
Boomi MDH API
You say you would like to search "Name" and get "Src_Id". If you using avenue
(1) - you simply go to UI and select "Add Filter"->"Field Data"->select "Name"->select operator "Equals"->{fill in name you'd like to search for} --> The entire Golden Record is returned and you can see it via the UI or by clicking the timestamp to pull up the record in depth
(2) refer to https://help.boomi.com/bundle/hub/page/r-mdm-REST_APIs.html
specifically "Query Golden Record". You would fill in all the necessary API information (URL)+Basic Auth based on Repository+universe id-based on model, etc.
Your request body would look like:
<RecordQueryRequest>
<view>
<fieldId>SRC_ID</fieldId>
</view>
<filter>
<fieldValue>
<fieldId>NAME</fieldId>
<operator>EQUALS</operator>
<value>{INSERT NAME TO SEARCH}</value>
</fieldValue>
</filter>
</RecordQueryRequest>
Response will be in XML corresponding to your model: eg)
<RecordQueryResponse resultCount="1" totalCount="1">
<Record recordId="GUID" createdDate="TIMESTAMP" updatedDate="TIMESTAMP" recordTitle="DERIVED BY MODEL">
<Fields>
<rootelementname>
<src_id>123</src_id>
</rootelementname>
</Fields>
</RecordQueryResponse>

Datepicker not able to just allow future dates on ODOO V11

Hello team I am using ODOO V11 and a need a rule in the datepicker that not allow choose past dates.
For that I am using a module from community
https://apps.odoo.com/apps/modules/11.0/web_widget_datepicker_options/
I got some error when I put as parameter 0 in the min date to allow just dates from the current date:
<field name="active_date" options="{'datepicker':{'minDate': '0'}}"/>
eError: maxDate() Could not parse date parameter: 0.
When I try pass a specific date it works successfully
<field name="active_date" options="{'datepicker':{'minDate': '2018-09-01'}}"/>
Could you please take a look and tell me the parameter correctly to put in the option for datepicker?
for making datepicker only accept future dates, you need to change your code into
<field name="active_date" options="{'datepicker':{'minDate': 'now'}}"/>

How to provide field type in XML datasource of ireport designer?

I am newbie to the ireport designer.This question may simple for you.I have tried to XML file as data source and it worked.The problem is All the fields are coming as java.lang.string. How to provide the field type in XML datasource.Is it possible to provide field type in XML file itself. Consider
<customer>
<name>obuli</name>
<age><22></age>
<subscriber>
<name>sundar</name>
<no_of_transactions>100</no_of_transactions>
</subscriber>
</customer>
Here the customer and subscriber are classes so i need to provide filed type com.test.Customer,com.test.Subscriber. I can achieve this by java bean datasource. But still i need the XML datasource way.
Is it possible to set the field type in XML datasource way ?
I do not think so. I also do not think you need that feature as reports only require scalar values. So just map the scalar values in your datasource to your scalar valued report fields.
You have to go on the XML code of your document and then search your field tag name, for example:
<field name="xxxx" class="java.lang.String"/>
change to Date type:
<field name="xxxx" class="java.util.Date"/>

How to access input control parameters from Jasper server?

I want to create a jasper report which changes the query and add/removes additional conditons in its where clause based on the input provided by the user in the jasper server.
One option is to sql inject the querystring in the jrxml file, but that looks messy as we may have additional conditions in the where clause which may be added.
The other approach mentioned in this post Dynamic querystring in JRXML seems to be a good one.
I would like to know how can I access the control parameters in the java code passed from jasper server?
Or can I give some kind of conditional logic within the jrxml file? which checks if some of the input controls are empty then assign one query in the queryString variable and another query if other conditions are valid?
Thanks.
Buld a "fake" parameter named P_DYNAMIC_WHERE_CLAUSE, based on your real input parameters. For instance:
<parameter name="PARAM1" class="java.lang.Long">
<parameterDescription><![CDATA[Real query criteria on column1]]></parameterDescription>
</parameter>
...
<parameter name="P_WHERE_CLAUSE_PARAM1" class="java.lang.String" isForPrompting="false">
<parameterDescription><![CDATA[Computed parameter, containing the optional SQL where clause corresponding to parameter PARAM1]]></parameterDescription>
<defaultValueExpression><![CDATA[$P{PARAM1} != null ? " $X{EQUAL, COLUMN1, PARAM1} " : " "]]></defaultValueExpression>
</parameter>
and use the $P!{P_DYNAMIC_WHERE_CLAUSE} syntax in the queryString.
For instance:
<queryString>
<![CDATA[SELECT /* my_jasper_report */ column1
FROM my_table
WHERE (1=1)
$P!{P_DYNAMIC_WHERE_CLAUSE}
]]>
</queryString>