Rally / Bugzilla: syncing "Schedule State" / Status field - bugzilla

Has anyone used the Rally-Bugzilla connector to sync the state fields (e.g. syncing the Schedule State field within Rally against the status field in Bugzilla - which has values such as "NEW", "EVALUATED", "ASSIGNED", "IN_WORK" etc)? As I see it, this is complicated by the fact that there isn't a 1:1 relationship between the values across the 2 systems, in which case does anyone have any suggestions on approaches?

This is generally facilitated via a Field Handler in the config.xml for the connector. There's a decent discussion of this at http://www.rallydev.com/help/rally-integrations-faq-and-best-practices#How-to-map-fields. The general idea is this:
<Connector>
<FieldMapping>
<Field> <Rally>State</Rally>
<Other>BG_STATUS</Other>
</Field>
....
<OtherFieldHandlers>
<OtherEnumFieldHandler>
<FieldName>BG_STATUS</FieldName>
<Mappings>
<Field><Rally>Defined</Rally> <Other>New</Other></Field>
<Field><Rally>In-Progress</Rally> <Other>Assigned</Other></Field>
<!-- Etc -->
</Mappings>
</OtherEnumFieldHandler>
</Connector>
Note that you may need to go into the Rally tool to define some custom values for the State field/drop-down in order to accomodate the heuristic mappings of State values in Bugzilla.

Related

Extract Product field for display on Test Case Search page

I am extending Kiwi TCMS for my team and trying to display the Product on the Search Test Cases page. The Product is tied to the Category field and I am not sure how to extract that field within the testcases/static/js/seach.js file.
I have traced it back to jsonrpc.js but am missing something, not sure what it is I am not seeing.
I added the Product field in the search.html file and the data is moved 1 column to the left since the array does not contain the Product field. I have tried "product" and "product_id" in the columns[] section of search.js.
Thanks
I have traced it back to jsonrpc.js but am missing something, not sure what it is I am not seeing.
JSON RPC is a communications protocol. The spec is very simple, you can find it at https://www.jsonrpc.org/specification. The jsonRPC function in Kiwi TCMS is a wrapper for that.
FK relationship between models are represented with a field called ..._id. For example Category has a field product_id. At the same time the Product model has a reverse relationship to Category - this is something that the underlying web framework adds automatically. The field is called Product.category.
Checkout how to make queries here:
https://kiwitcms.readthedocs.io/en/latest/modules/tcms.rpc.api.html#module-tcms.rpc.api
If you have test_case.category_id then you can send another API request to Product.filter method filtering on the category field with the respective value.
Inside the browser console you can do something like:
jsonRPC('Product.filter', {category: 1630}, console.log)
and see the results you get.
I added the Product field in the search.html file and the data is moved 1 column to the left since the array does not contain the Product field. I have tried "product" and "product_id" in the columns[] section of search.js.
You will have to modify the entire page (which includes search, the callback, the HTML template and the function rendering the returned data) for this to work.
It sounds like either
you need more information shown in the search table: there isn't much space available, OTOH there is a filter per Product so if you teach users to filter by product everything they see will be related to that product so they won't need additional column for that information
you need a more flexible mechanism for extension - it is mostly doable and possible to design pages in Kiwi TCMS to be arbitrarily extensible, however we haven't thought in this direction and we need more information about the intended use-case to figure out the underlying architecture.
you can design an entirely separate search page, using the upstream code as your base. Then bundle that into a plugin and just install your plugin into Kiwi TCMS. That actually sounds like the best option in this case and you will have full control over that page, see https://kiwitcms.readthedocs.io/en/latest/plugins/index.html.

Accessing CustomFieldDefinition metadata via tooling api

So, I've been attempting to gather picklist dependencies per Opportunity record type for my lightning components. I have been able to retrieve Standard Field dependencies by RecordType, but it the Tooling API will not return the custom field dependencies. Standard calls and queries will not work either, as they state that the field has no controlling value or dependency.
Given this information I suspected that there was a table that is hidden somewhere that contains the keys for the RecordType and FieldDefinition, hopefully with a nested Metadata object.
I found an Id in one of the parameters in the setup menu for a Record Type and Id.getSObjectType() on it. The table name is CustomFieldDefinition. However, it is not accessible via SOQL or the Tooling API.
Has anyone accessed this table? Or has anyone been able to retrieve the field-record type picklist dependencies on custom fields AND standard fields?Tooling API ResponseDebug Log with SObject Name
I think you're doing it wrong.
"Controlling field" would be another picklist or a checkbox for example, something you change during same edit action. If you have dependency to record type - in that sense it's not a controlling field. Sure, you change record type and picklist changes - but really everything would change, it should be a different page layout (different fields shown, marked readonly/required etc). There's a reason that record type change is not done on normal edit screen, you do it by clicking special link on detail view and then everything "explodes".
Have a look at "User Interface API" - set of tools meant to help your custom app (mobile? desktop?) steal recreate a normal page layout. This one might be especially useful: https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_resources_picklist_values_collection.htm
There's even a Trailhead: https://trailhead.salesforce.com/en/content/learn/modules/user-interface-api (skim through whole set but especially read last module)
And since you mentioned Lightning Components - are you aware of these ready tools:
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_ui_api
getPicklistValuesByRecordType
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_generate_record_input_create
or maybe you don't have to code it all and stuff like <lightning-record-edit-form> with recordtypeid passed to it will solve all your problems
Have a look, if I didn't give you a working solution then at least you have some keywords to Google around. If you're still stuck - try to post a code sample as new question?

Adding fields to a Junction Object from one of the Master-Detail relationships

In a Salesforce Junction object can I reference fields from the two Master-Detail relationships in formulas and/or the User Interface or am I going to have to switch to Apex code? I can write the apex, but I try to use the built in tools as much as possible :).
To use the examples from the Trailhead tutorials I have
1. A Job Position Object (Project Mananger, Sr Developer, etc).
2. A Posting Website Object (Monster.com, Dice.com, etc).
3. A "Job Posting" Junction Object to link the two.
Let's say I add a field to the Job Position Object called "Close Date" to keep track of the date the position closes. Can I display this field on the layout page of the Job Posting Junction object without using Apex code and/or a custom VisualForce page?
Thanks!
You can definitely do that. You can use a formula field and just reference the relationship name of the object and the field name (so for example something like Job_Position__r.Close_Date__c), or if you prefer you can use the "Insert Field" button when creating the formula which will allow you to select the object/field you want through the UI.

Not getting values to LOV after Execution

I am Facing problem with Lov, I am having three lov fields in the page which are defined on other viewObjects than current page viewObject. iam successfully able to bind them to the page i.e getting values by clicking the icon.
but the problem is while executing i am not getting any values for these fields, i tried to override createInstanceFromResultSet() method in viewImpl class where iam getting ids and setting values, for example by using appid in current row of Vo, iam setting appName, with out success. iam very new to ADF, any solutions. my jdevelper version is oracle 11g release2
Actually my functionality is similar to POST-QUERY trigger in oracle forms, where you set the values based on id.
Anybody has any guesses please share.
The Best way i found out is From "Oracle® Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework Release1 is To have your View object based on multiple Entity Objects, joining in all the information you need in the query from the main table, as well as any auxiliary/lookup-value tables. so in one trip you can bring all the values from the database.
I believe the way that you did bind these LOVs are wrong, follow this blog post https://blogs.oracle.com/prajkumar/entry/create_lov_in_adf_application it'll give you a heads up about the proper way to make LOVs
If you can't get LOV value after execution in ADF, then please check both data types you defined on ViewObject and to those fields, apply Lov. If the data type of both the fields is different, then the submitted value is refresh and Lov field is showing blank.

Show Opportunity related Contacts in Custom Object Field

I have the next issue.
I have a custom object called 'Application', and I have this requirement:
"Show all Contacts related to an Application. Create a field on Application object, must be read only".
I solve it with apex code. 'Application' has a lookup to Opportunity, Opportunity to Account, and all my contacts have AccountId, so this way, I get all the contacts using apex code in a trigger.
But, I've been ask to change this to a Formula field in Application object.
So, my issue is next. I'm not able to get all contacts with advance formula editor, because they're not part of any object. I have no master-detail relationship.
Does any one know how can I achieve this using configuration? I should not use apex code for this req.
Thank in advance guys.
I don't think you can do it.
In formulas / merge fields syntax there's no way to go "up, up then down" (Application -> Opportunity -> Account -> down to Contacts related list). There's also nothing that would let you loop through Contacts (and display what? Ids? Names? Emails?). Roughly speaking you can only go up through dots.
You might want to explore path of "cross object workflow" rules but I imagine that when I add a new Contact to Account it should somehow "spread itself" to all related Applications? There's no straight way to fire a workflow on delete too - so you'd eventually end up with inaccurate list.
I'd say trigger was a good solution. Maybe it ws unoptimized but if it has to be in a field - tough.
There might be a fairly simple way of achieving that by embedding a visualforce page within Application page layout.
This should be doable with pure Visualforce (so technically there will be no Apex code ;))
Something as simple as
<apex:relatedList list="Contacts" subject="Application__c.Opportunity__r.AccountId" />
would be a good start (if you want your own layout and not a rel. list - you should be still able to pull it off with <apex:repeat> or <apex:pageBlockTable>.
There's one BUT here: it's not a field, just a display trick. Forget about using it in reports, mobile applications etc.
Another way - would it be acceptable to be 1 click away from these contacts? You could make a report "Account with Contacts", filter it by Id of one Account and later use "URL hacking" to change the filter depending on from which Application you'll click it. This link could be either a formula field or a real custom button/link. Technically - it's pure config, no apex & VF.
You can read more about URL hacking at Ray Dehler's excellent post and specifically about dynamic Reports here or here.

Resources