Polarion for admins, custom widgets, Velocity, Lucene etc - lucene

I'm starting to create custom widgets, like adding up the 'remaining time' of some work items and showing that on a live report page for instance. Google and SO helped for this but is there some resource available with examples of the most common Velocity functions etc?
Also trying to use the Polarion parameters like $date, $info and $message to create a live doc page, but I can't find the full list of these variables anywhere.
Thanks

Velocity is a rather simple template programming language and it holds only some variables in its context: see Polarion help, for more details:
$calendarTool
$me
$page
$platformService
$projectService
$securityService
$testManagementService
$trackerService
$transactionService
$wikiService
Depending on the location of the invoked script you can have one of the following variables in your context as well:
$testRun
$document
$plan
But most important is the $trackerService as the main entry point to the Polarion API only the API will give you the power to do stuff on the wiki pages (like Traceability Analysis, calculating sums, etc.)
For Plan-pages you can use the newer Rendering API which helps to show fields and links to WIs without messing with too much HTML code

Related

How can I add autocomplete "Candidate Users, Candidate Groups" for User Task?

i'm beginner in bpmn ,i created human task , how can add autocomplete in Candidate Users, Candidate Groups fileds it's possible? autocomplete from list ,active directory, ... .
The properties panel is just a minimal example and has no built in data binding.
However, it is itself highly flexible in what content is displayed and this is where you can start to develop your custom data provider.
There are not really tutorials out there on how to write a custom data provider for your properties panel but you can make use of the following example from the official examples repository:
bpmn-js-examples/properties-panel-extension/
It is quite complex and takes some time to understand just from the code and the spare documentation but let me tell you, that this is the place to look at if you want to write your custom data provider.
If you get stuck at a specific point, you can create a new question here on SO with a concrete code example.

How to create a searchable central repository of code documentation using DocFx

I'm looking to create a central repository for all of our published API documentation using DocFx. I have documentation auto-generated via my build (using TFS) and published through my release (using Octopus) just fine for multiple individual sites. However, I'm wanting to pull it altogether in one location. The thinking is that through a parent site you could filter content in any of the individual sites without having to drill down into them. Do you have a recommendation on how to do this?
Also, within this same documentation repository I want to provide the capability to search by all of the meta data (project-level documentation) across the hundreds of projects in our portfolio. This will give our BA, DEV and QA teams easier access to what all our systems do. I like the "filtering" capability built into DocFx, but I'm wanting full-text search across all of the meta data. Do you have a recommendation for this functionality as well?
To change the location of the docfx output, edit the docfx.json file and specify the dest value. By default it is "dest": "_site". For more formatting guidance, reference: https://dotnet.github.io/docfx/tutorial/docfx.exe_user_manual.html.
Regarding full-text search, that is possible by simply ensuring the ExtractSearchIndex post-processor is invoked (in order to generate an index.json file of keywords) and that the global _enableSearch value is set to true in the docfx.json file. A snippet from that file would look like:
"postProcessors": [ "ExtractSearchIndex" ],
"globalMetadata": {
"_enableSearch": "true"
}
For your first question:
I think what you expect is like the .NET API Browser. The source code behind this page is not open to public, so you need create this page by yourself, through collecting xrefmap.yml from multiple sites, and extract the needed data into this page.
For your second question:
DocFX uses Luna to scan all the output files and generate an index file called index.json for later search use. In your case, you should want to limit the search scope only in the metadata you defined. This is also not supported by DocFX by default. You can also use Luna in your central place to search these meta. You can create your specific index.json for each project first, and the cental place to collect them for the search page.

How to retrieve Salesforce Page Layout Field Properties via API?

Context:
The Web interface coded in .NET (Grantee Portal for nonprofits applying for grants) is pulling information from the Salesforce Page Layout.
The Salesforce user we use to connect the Web interface with Salesforce via API has 'view all and edit all' rights
Issue:
As it is now, if a field is defined as Read-Only on the Page Layout in Salesforce, it is still editable on the web page (the Salesforce User we use has to have 'view all and edit all' rights)
What we are trying to achieve:
IF a field is defined as Read-Only on the Salesforce Page Layout
THEN the same field should be Read-Only on the Web interface page
Question:
To achieve the above, I guess that I need to fetch the field property for the Page Layout via API. Any ideas on how to do so?
Thank you!
Izumi.
You'll need Metadata API (the set of webservices that let you add new objects, fields, picklist values or even create classes & run unit tests).
Here's the API Guide: http://www.salesforce.com/us/developer/docs/api_meta/index.htm
Depending on how often you modify layouts you might decide "screw it, I'll just use Eclipse IDE". In that case you'd download all page layouts (they're XML files), point your C# app to them and let the magic happen.
Slightly more advanced is to use Migration Tool (Ant / Java based application that can be scripted for periodic download of same stuff).
Super advanced would be to use this API guide to write it in C#. It's not rocket science (here's the specification for Page Layout object and here's the Java sample code for the operation that retrieves the metadata... sorry, no C#). Actually you might be better off looking at this example though: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describelayout.htm
Seeing that you'll probably want to cache this info somewhere anyway (I can't imagine your user coming to your page, having to wait for the webservice callout to complete, then having his UI rendered) - pick your poison.
Or share the work within the team (1 person kicks off with files downloaded with Eclipse, other tries to figure out the C# code to retrieve them on demand).

Pass product variables by user selection

I want to make a ticket sales site theme. As you might guess, most of ticket sales site using a flash based chair selection tool. Those systems using premade scenes which is audiences can select their chairs. I can make premade scenes with jQuery or flash but I don't know how can we handle this selection by Magento.
So, what I want to know that is it possible to pass a user specific variable in Magento? I mean, this variable should be available in checkout and backend as well. Could you please give me an advice to accomplish such an idea?
If this option can be selected from a fixed list of options, then what you want can be achieved using Configurable Products, or Custom Options.
If what you're looking for is a completely bespoke user-defined value, then this is pretty programming intensive, so if you're not a developer it's not an easy task.
Forgive the shameless self-link, but I've recently posted on this topic here:
http://mikebywaters.wordpress.com/2012/03/29/adding-custom-data-to-a-cart-item-in-magento/
In short, the post says that you can add an array of custom data to the quote when the item is added to the quote. For this, you’ll have to hijack the add-to-cart controller completely. To start with, take all the functionality from the existing controller. Look at the Mage_Sales_Model_Quote::addProduct() function and you’ll see that it takes two parameters like so:
$quote->addProduct($product, $request);
where $request is of type Varien_Object formatted like this:
$request = new Varien_Object(array(
'qty'=>$qty,
'options'=>$options,
'custom_options'=>$custom_options
));
Hope this helps.

How is the Trac Project List page customised?

We've been using Trac for a while now for our developers only. However we are now opening it up for our (internal) clients. We have a project listing page (based on the default one that comes with Trac). What we'd like to do, is display more information about the project than what is currently available.
I have searched google and here, to see if I can find how to get more information. There seems to be a variable called $project which has .name, .description and .href as attributes.
Is there somewhere, a list of the attributes available? Or perhaps a different solution altogether that will allow us to display more information on the project list page. Such as the number of open tickets etc.
As far as I known, you can use $project.env as well. It is an object, which provides a number of attributes:
$project.env.base_url
$project.env.base_url_for_redirect
$project.env.secure_cookies
$project.env.project_name
$project.env.project_description
$project.env.project_url
$project.env.project_admin
$project.env.project_admin_trac_url
$project.env.project_footer
$project.env.project_icon
$project.env.log_type
$project.env.log_file
$project.env.log_level
$project.env.log_format
More detail is available at env.py
On the project page customization page there is not much variables, indeed. Looking at the source code there is also trac.version, trac.time, but that's all. There is also project.env that may hold more information. I do not have a multiproject setup at hand, so you might be interested to see for yourself what variables are available with TracDeveloper plugin. It dumps variables if enabled and you add debug=true in the URL.