I am using the Event Subscription Tool, which sits on top of the bissubscribe.exe tool to create some custom alerts. I need to query against some custom work item fields, but I'm not sure how to reference them in the code.
Here is how you reference a system field (this works):
CoreFields/StringFields/Field[ReferenceName='System.AssignedTo']/NewValue" =
'Daniel, Jim'
Here is how I'm attempting to reference a custom field (this does not work):
"CoreFields/StringFields/Field[ReferenceName='ProductBacklogItem.CustomField.1']/NewValue"
= '400'
Am I referencing the custom field wrong? I can find no documentation how to reference it. I am wondering if the custom fields live under "CoreFields..." -- doesn't seem like they would, but I don't know where they would be.
Thanks for any help
I found the solution. You cannot access the custom fields through "CoreFields" in an event. You may only access a custom field that has changed, and you must access it like this:
"ChangedFields/StringFields/Field[ReferenceName='ProductBacklogItem.CustomField.1']/NewValue"
= '400'
Related
I want to be able to share a link to a Property model whilst setting permissions on which attributes the recipient can see. I've been through a few different ideas but none of them have felt 100% right. The closest I think I've come is this:
Have a Share model that belongs to Property. It also has an attribute called permissions which is a string.
On the create Share page I generate a series of checkboxes using Property.column_names. The benefit of this part is that I can add more attributes to Property without needing to change any code. Before the Share is created it converts the permissions params into a string.
When the user visits the Share page I can convert the string into a hash and then in the view check whether each attribute is present. If it is present I display the data, if not I don't.
Storing this data as a string seems wrong but I haven't been able to come up with a viable alternative. I could store each attribute on the Share model as a boolean but that would mean adding a new attribute to Share every time I add one to Property.
Any suggestions on how to tackle this?
Thanks.
I was wondering if there was a way, to show certain parts of my footer, only when in certain categories.
E.g. a email link (mailto) only when in the Category:FAQ
I am using a custom Skin.
With help of this snippet a CSS class is added to your body tag for every category the current page belongs to. You could then display or hide certain elements with help of the corresponding class.
If you are using your own, custom skin, you can just check what categories your current wikipage belongs to, by calling
OutputPage::getCategories(). This will probably affect caching, though.
if (in_array( 'FAQ', $out->getCategories() ) {
// do something
}
edit: #Florian points out below, that you should use OutputPage methods to output stuff, rather than echoing them, so I removed that unfortunate example. And as #Florian also points out, if you want this effect to persist also for users who might have selected another skin than your custom one, you'll have to use a hook, e.g.SkinTemplateOutputPageBeforeExec.
I know that Angular2 has #ViewQuery to get a QueryList of components matching the given type. But is there a way to get a reference to a particular component in this QueryList?
Right now, the only way I can think to do this is to give the component an extra "id" field, then iterate through the QueryList and check if the identifier is the one I want, e.g.:
getComponentById(QueryList<HasIdField> queryList, String id) =>
queryList.singleWhere((component) => component.id == id);
But this seems like a common enough problem that it seems like there should be a way to do this without adding this "id" boilerplate. I know that a component can be referenced locally within a template using #, but is there a way to reference a component similarly within a class?
Currently this functionality does not exist, see here for details on why the functionality to implement a custom filter is currently on hold due to potential performance reasons.
So the way you are doing it seems to be the right way given the functionality that is available currently, but this might change as the framework is now in alpha.
I'm trying to add new field in SugarFields and i have many problems. I have to create a new field which is combination of relate field and multienum, when user clicks to select one/many item(s) the list will be loaded to dropdown list (multiselect). I have copied and modified relate field but i can't see how to get data from pop-up window
Have anyone tried this before? Please give me a clue. I'm using SugarCE-6.5.13
Thank you.
I can't upload image so this is a link from mediafire :(
http://www.mediafire.com/view/523c1kwewld18hn#
You do not need to create a custom field. What you actually want to do is add some custom JavaScript that will make an ajax call to the server to obtain the values for the multi-select from the relate.
There are two different types of data for a relate field. Data when you type ahead and data that is returned from a popup.
For the popup: you will need to override the function set_return(popup_reply_data)
I can't remember off the top of my head, how to handle the type ahead.
This is probably a very "dumb" question for whoever knows VirtualShellTools but I only started using it and couldn't find my answer in the demos' code. Please note that I'm also unfamiliar with virtualtreeview.
I use a VirtualExplorerTreeview to display a directory structure, linked with a VirtualExplorerListview to display a certain type of files in the selected directory as well as specific informations about them
I've been able to point them at the right place, link them as I wanted, filter everything in the listview, and looking at the demos I have a pretty good idea about how to add my own columns and draw it to display my custom data.
My issue lies with the Treeview: I would like to sort the directories displayed in the order I want; specifically, I want "My Docs" and other folder to appears first, then drives, then removable media. Looking in the TNamespace property I found how to distinguish them (Directory and Removable properties), but I don't know how to implement my own sort/what event I need. I tried CompareNode but that doesn't even seem to be called.
If you want to do everything yourself, then set toUserSort in the TVirtualExplorerTree.TreeOptions.VETMiscOptions property. That causes the control to just use the DoCompare method inherited from the virtual tree view, and that should call the OnCompareNodes event handler.
A better way is to provide a custom TShellSortHelper. Make a descendant of that class and override whichever methods you need. Create an instance of that class and assign it to the tree's SortHelper property. (The tree takes ownership of the helper; free the old one, but not the new one.) If the items are being sorted on a column that that class doesn't know how to compare, then handle the tree's OnCustomColumnCompare event.
To help you figure out exactly which methods you need to override or events you need to handle, set a breakpoint in TCustomVirtualExplorerTree.DoCompare and step through to see what gets called in various situations.