Scheme for custom fields on issue types - jira

I'm wondering if it is possible to create a kinda scheme that is a list of custom fields and apply this scheme to an issue type.
This would cause that issue type to have all custom fields in the list.
I know you have to first associate the field with a screen and also a field configuration. But its this last step 'project and issue type scope' that is confusing me.
The only way I could see how to do this is to go into EACH custom field, then go to the CONTEXTS for that field, then add a new context associating the field and the issue type.
Field configurations and field configuration schemes don't seem to do the trick. It still seems a necessary condition to have your custom field associated with an issue type, but you still need to do that step above, to create a new context for each custom field.
I'm wondering if there is a way to group all the fields in a scheme and associate that scheme once instead of having to do it for EACH FIELD.
Am I missing something? Or it's just not possible?

You're looking for Issue Type Screen Scheme.
First create a default screen with the fields for issue type X. You can also create screens for Create and Edit too if you want
Then define a Screen Scheme for issue type X which says which of those screens to use for that issue type.
Then create an Issue Type Screen Scheme (ITSS) that uses the Screen Scheme for issue type X
It is convoluted but does work. Don't use Field Configurations unless you need to make the field required, and even then it's better to use a Validator on a transition. The only time you need a custom field context is if you have select lists with different sets of options for different projects. If possible, avoid using issue types in custom field contexts.

Related

Import Umbraco property editor

We have site where a user went to the Data Types, saw we had a Content Picker data type using "(Obsolete) Content Picker" (Umbraco.ContentPickerAlias) and changed it to Umbraco.ContentPicker2
Our code relies on the obsolete one currently and now he cannot set the content we want him to.
Is there a way to recreate/reimport the Obsolete property editor into Umbraco?
On the Data Types node you can click on the ... and create a 'New data type' - then select the obsolete one to create it again.
But in theory, I believe you could just do the opposite of what the user did, on the ContentPicker click edit and pick the property editor from the dropdown if available?
Within the umbracoSettings.config file, there is a property you can create/set to true that will make obsolete data types become available to use against data types
<showDeprecatedPropertyEditors>true</showDeprecatedPropertyEditors>

Rails - permissions to view specific attributes

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.

Custom validation in mvc

I have a dropdown list conatining some options. The last one is "other". When the user chooses the other option a textbox appears next to the drop down list. When the user chooses "other" he must enter a value into the textbox. Both, the dropdown list and the textbox, point to one single property of the the model.
How do I achieve this using custom validation? what is the best solution?
It seems what you're looking for is conditional validation. A very nice example is already mentioned in another question where you could create a custom RequiredIf attribute.
The topic has also been addressed frequently on stackoverflow.com

Creating Managed Lists Like Versions and Components

In JIRA, you can create custom fields which is good, but I feel that their field types are relatively weak.
For example, you can choose the 'Label' which you can add custom labels. That is good, but I need to be able to choose from a list that already exists and do not want users to be able to create new ones freely.
So that leaves us with the option of using a Single Selection List or a Multi-Selection List. The problem with this is the limited way of using it... drop-down. I wish you could populate an item similar to the way you can add a predefined 'Version' or 'Component'. The drop-down feels primitive.
So my question is: Are there a way of changing the selection interface of a list so that it mimics the way you would set a 'Target Version' for example (simply type it in freely and you can remove an item by clicking on the 'X' button).
Or if not, is there a way to create completely separate groups so that they can behave exactly like the 'Version' and the respective 'Version Picker' field.
I want my 'Customer' field to look and behave exactly like my 'Version' fields... not drop-down like.
Versions and Components fields use autocomplete renderer, but
For custom fields of type Multi Select, only the Select List Renderer is available. Furthermore, when modifying a field configuration, you will not be able to configure a Multi Select custom field's renderer.
see this link https://answers.atlassian.com/questions/16669/looking-for-a-custom-field-similar-to-the-component-field

What syntax to query a custom work item field

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'

Resources