Using a TypeDefinition Query:
https://rally1.rallydev.com/slm/webservice/v2.0/typedefinition/?fetch=ObjectID&pagesize=100&pretty=true
I can grab the Object ID for Hierarchical Requirements definition.
Using that ID I can get all the attributes (inputs) for Hierarchical Requirement's (User Stories).
https://rally1.rallydev.com/slm/webservice/v2.0/TypeDefinition/[DefObjectID]/Attributes?pagesize=100&order=ObjectID&pretty=true
However I wondering how I can order this list in the order it is displayed in the "Create User Story" screen in RallyDev?
I don't believe there is a way to do this- there is no "category" field with which to group the fields. Those editors are manually configured to logically group fields together. You could fairly easily group some of them together based on whether they are required or custom, but other than that you'll have to manually arrange them...
Not exactly sure what you mean by "Create User Story" screen. The default view for "Plan -> User Stories" shows in Rank order. If that's what you are looking for then the order would just be:
order=Rank
Related
I am a total beginner on DynamoDB and hardly know how to make a working query. But I recently came up with something which is apparently doing what I want.
Here is my question, I now have a table like this:
It has a primary partition key and a primary sort key:
Primary partition key
primaryPartitionIdKey (String)
Primary sort key
primarySortIdKey (String)
But two fields are not enough to do what I need. I would like to add one more.
Another field:
otherFieldIdKey (String)
Is that possible, if YES: how should I do it?
I can' see anything on the AWS console for that.
DynamoDB tables are schemaless, which means that neither the attributes nor their data types need to be defined beforehand. Each item can have its own distinct attributes.
So, your new "field" or attribute will be automatically created upon the first record put/update operation.
See DynamoDB Core Components.
Follow these steps to write data to the Music table using the DynamoDB console.
Open the DynamoDB console at
https://console.aws.amazon.com/dynamodb/.
In the navigation pane on the left side of the console, choose
Tables.
In the table list, choose the Music table.
Select View Items.
In the Items view, choose Create item.
Choose Add new attribute, and then choose Number. Name the field Awards.
Repeat this process to create an AlbumTitle of type String.
Enter the following values for your item:For Artist, enter No One You Know as the value. For SongTitle, enter Call Me Today. For AlbumTitle, enter Somewhat Famous. For Awards, enter 1.
Choose Create item.
Do this one more time to create another item with the same Artist as the previous step, but different values for the other attributes
In our Siebel 7.8 application, we have three entities: service requests (SR), groups and employees. Each employee can be member of one or many groups, and each service request can be assigned to one or many groups too.
I have a requeriment to create a calculated field on the service request BC, which will indicate if the current user belongs to any of the groups asociated with the service request.
I already have created a multivalue field, called SR Groups, on the service request BC. I have also another multivalue field, Employee Groups; this one is on the Personalization Profile business component, which means that Siebel will generate automatically a multivalued profile attribute with the same name. All of the above is working as expected.
Next I've created this calculated field:
IIf(InList([SR Groups], GetProfileAttrAsList("Employee Groups")), "Y", "N")
It works, but it only checks if the SR's primary group is one of the current user's groups. I need to check all the SR groups, not only the primary one. So, I have created another calculated field:
IIf(EXISTS([SR Groups] = GetProfileAttrAsList("Employee Groups")), "Y", "N")
This one doesn't work. It shows always "N". However, according to this Bookshelf document:
a typical usage of the EXISTS operator in this scenario is EXISTS ([Targeted States] = GetProfileAttrAsList("State")). This does a many-to-many match of the MVG Business Component Field Targeted State against the MVG profile attribute State.
Which is exactly what I'm trying to do, without success. I can't see any difference between my expression and the example one. And there isn't any of the typical Bookshelf warnings, like "if you're going to use this function, you must activate the Link Specification property of the MVF", or anything like that.
The business component is based on a specialized class, CSSBCServiceRequest, but I don't think that should be a problem in this case - switching it to CSSBCBase doesn't fix the issue either. The only thing not working seems to be the EXISTS operator, which is pretty standard in Siebel.
Also, if I execute a query on the application with the expression EXISTS([SR Groups] = GetProfileAttrAsList("Employee Groups")), it doesn't filter out any service request as it should.
Any clues?
After a lot of testing, I've been able to figure out a workaround. I'd still like to know why my first attempt didn't work, but anyway...
Given that the problem with my first attempt seemed to be matching a many-to-many relationship between the MVF and the multivalued profile attribute, I've split it in two one-to-many matches:
In the link, I've stablished a search specification property. This way, my multivalue field will contain only groups associated with the user:
InList([Group], GetProfileAttrAsList("Employee Groups"))
In the BC, it only remains to check if there is any value in the MVF or not:
IIf(EXISTS([Filtered SR Groups] IS NOT NULL), "Y", "N")
I'm trying to enable content editors to select an item that resides in a bucket in a droplink field but I'm unable to find a field type/datasource that enables this.
I need to allow the user to select a single item (so not a multilist), the items are in a bucket as the number of items may be huge and the search api would be most helpful to the editors.
Is there a field or datasource query that will enable a lookup field to select a single bucketed item?
The simplest solution is to use a Sitecore multilist with search field.
First you need to set the source of your field to display items within your bucket of a specific template(s).
Example: StartSearchLocation={11111111-1111-1111-1111-111111111111}&Filter=+_templatename:sample item
Here is an article describing how to set the source of your field: Sitecore 7 field types
If you need to limit the selection to one item then you need to also apply some regex. To achieve this you need to enable standards values in the view tab so you can alter the data section.
In the data section add the following regex: ^({[^}]+}\|?){0,1}$ and add some validation text.
Example:
This article provides additional infromation:Limit selected items on Sitecore multilist field
Just in case anyone else comes across this as I did, you can also use a query in the source field to filter the items in a droplink.
query:/sitecore/content/Home/YourBucket//*[##templateid='{your-template-guid}']
You can also use ##templatename='Your Template Name'
Keep in mind that unless your bucketed items aren't numerous (for some reason), the suggested answer is probably better since it provides search, and will not create a massive dropdown list of items.
I made some custom fields for this very purpose: https://github.com/Barsonax/SitecoreSearchFields
It gives you the same rich search interface you normally get when searching in buckets.
I have the following content structure in Sitecore:
Home
Products
A-E
A Sample Product A
B Sample Product B
F-J
K-O
L Sample Product L
P-T
U-Z
In addition each Product has a checkbox field called "Active". I would like to have a Treelist that lets the user select one or more products - but they should only be allowed to select Products where the Active checkbox is checked. Is this possible?
It sounds like you can achieve what you need using Sitecore query. Check out the documentation for exact syntax rules.
Not all field types support Sitecore query though, so you will need to use a field type that does (Multilist). Or you could implement a custom TreeList field type that works with query.
You can also use the properties IncludeTemplatesForDisplay or IncludeTemplatesForSelection to keep your TreeList fields clean.
IncludeTemplatesForDisplay makes certain only those templates will show up in the TreeList.
IncludeTemplatesForSelection allows you to define which templates you can actually select in the TreeList field.
In your case, you could set IncludeTemplatesForDisplay the template of your Products item, then the A-E etc. items, and also the actual Products template. If you then select IncludeTemplatesForSelection you can make sure the content editors can still only select the actual product item.
Other parameters are ExcludeTemplatesForSelection, DatabaseName, ExcludeTemplatesForDisplay, IncludeItemsForDisplay, ExcludeItemsForDisplay and AllowMultipleSelection.
Do keep in mind that won't allow selections where a checkbox is ticked, but you could consider creating a custom field based on a TreeList field, which has the additional property which checks whether the Active field is set.
I'm not sure that there is a way out of the box to set the datasource of a treelist (or any list based field, for that matter) to a set of Items and filter by the value of their fields.
How about thinking about it differently.
What if you had a mirror of the products section of the tree somewhere else in your tree but, instead of having all products in this mirrored section, you'd have only the products that are active. The items in this mirrored section would have a drop-link field that maps to the original product in the original section of the tree. To keep this list up-to-date, you could use a custom action when the original product is saved. When a product is saved, if the Active checkbox is checked, create an item of type Mirrored Product (for example) in the Mirrored Products section of the tree and set the drop-link to the original product. When a product is saved, if the Active checkbox is not checked, find the Mirrored Product that maps to this product being saved and delete it.
Finally, the datasource for your treelist would be the root of these Mirror Products section of the tree, not the original products themselves. This way, the options for your treelist would always only ever items that map to products whose Active checkbox was checked.
One thing to keep in mind: when you delete a Mirrored Product, if it's referenced by a treelist, that reference will remain; you'll need to have your code check for null before trying to use a treelist item.
I'm currently implementing a solution using django admin, it allows users to define in the db a product, and then custom attributes and details, more details may be aggregated by a common attribute, this allows me to query with ajax a custom view that returns some JSON data to build automagically the form fields that I need directly in the same formset view (manipulating the DOM).
The current DB design follows this schema:
Catalog(name, description, photo)
Product(rel_catalog, name, base_price, photo, manufacturer_email)
ProductDetail(rel_product, rel_attribute, percentage_price, fixed_price)
ProductAttribute(rel_product, name, description)
As you may see I have a catalog, where there can be more products, a lot of details per product, aggregated by attributes. Then I simple show by default the Catalog, then the select with all available products for that catalog, then, choosing the right Product, I obtain the complete form (each row has a label with ProductAttribute.name and a select with related ProductDetail).
All works pretty dam good, but I also need to store this references in the DB when someone completes the form (making an order with choosen products). This forms are displayed as StackedInline (the ModelAdmin is for the Order).
I don't know how many options there may be per product so I was thinking to use this design to track orders:
Order(customer, status, notes, tot_price, inserted_by)
OrderItem(rel_order, catalog, product, unit_price)
But I don't know how to store the dynamic added inputs...
I was thiking to implement OrderItemProperty(rel_orderitem, rel_productdetail, rel_productattribute) to store each single input... but how do I loop over this unknown fields?
Maybe do you suggest a better design?
If you need more code just ask for it and I'll reply with a pastebin link.
Thankyou.
Finally I got a working solution,
I've created a custom view, overriding the default "add/" view, this way I can customize whatever I want to and I can read the POST data handling each validation, putting then the data in the right model.