JIRA Greenhopper - How to set the 'Flagged' custom field of type “Multi-Checkboxes” in a Workflow Transition's Post Function - workflow

In our Jira (v4.4) we are using Greenhopper (v5.7.4), as such Greenhopper makes use of the Flagged custom field to mark Impediments, it is of type "Multi-Checkboxes".
Whilst transitioning from one state to another we are using a pre-installed Post Function to try a set the Flagged custom field. Specifically we are trying the 'Set field value from User Property value' post function.
To support this 'post function' we have tried adding a transition property called flagged with value Impediment and referencing it in the 'post function'.
This doesn't work.
Essentially 2 questions arise.
Is this 'post function' the best way to set a Multi-Checkbox.
If so, how do we specify the Impediment to be true?
For a better explanation of the default flagging behaviour see Flagging Issues in Greenhopper, this is what we want to automate in our transition's 'post function'.

Resolved the Issue - for those that may be looking for a similar solution - here is what I discovered, hope it helps.
Contacting Atlassian the following was suggested:
To set the multi checkbox custom field via post-function is possible.
First of all, you need to install JIRA suites utility plugin:
https://plugins.atlassian.com/plugin/details/5048 After that, in the
workflow transition, add a "Update Issue Custom Field" post function
with your custom field and put the flagged option (e.g. Impediment)
written in the "Custom Field Value" field.
So using the suggested "Update Issue Custom Field" post function I chose the Flagged custom field and used the value 'Impediment' on its own. This worked.
For another transition that unmarked the impediment I used the "Clear Field Value Function" and simple chose the "Flagged" field. This also worked at clearing the Impediment.

Related

Azure Dev Ops: How to set a boolean item's default value on a work item template

I have all required permissions to do whatever I want. This is our bug item template. We have a pre-existing Boolean item we've used for years now (To be Triaged - pictured below). It used to be defaulting to false, I want to default to true.
Is the only way / correct way to do this via a custom rule on create? Seems odd. Other text based fields for example allow you to specify required (this is greyed out, presumably because it's a bool?) and subsequently a default. This does not. Seems to require an explicit "rule" be created.
I could not find a way to do this without a custom rule. This rule worked for me:

Mask input for sap.m.Date(Time)Picker

With the sap.m.DateTimePicker, it's possible for a user to either select a value from the drop-down list or enter it manually. I'm wondering if there's a way to add a mask to the manual input box that matches the valueFormat of the DateTimePicker.
I know there's a sap.m.MaskInput as well, so maybe there's a way to combine the two elements.
There is a new private module named sap.m.MaskEnabler which the sap.m.InputBase (i.e. DateTimePicker) is supposed to make use of.
(MaskEnabler) should be applied to the prototype of a sap.m.InputBase.
The mask feature is currently enabled only in sap.m.TimePicker (v1.54). According to this commit message, however, the same feature will arrive to the Date(Time)Picker as well:
This change prepares for refactoring of DatePicker and TimePicker so the
common code of both pickers can be moved to a new common control that
they may extend.
Therefore, if it's not urgent, and depending on your project, I'd not create a new custom control and then throw it away once the mask feature has arrived.
I'll update my answer when it's available.
Until then (and even afterwards), you can still guide the user to enter the data in the correct format via OData binding type sap.ui.model.odata.type.DateTime:
<DateTimePicker
value="{
path: 'myODataModel>myDateTime',
type: 'sap.ui.model.odata.type.DateTime',
constraints: {
isDateOnly: true,
displayFormat: 'Date'
}
}"
minDate="{...}"
maxDate="{...}"
/>
In contrast to formatter, type allows us to keep two-way data binding.
The entered value is automatically intercepted from updating the model data when...
It could not be parsed due to an invalid format (fires parseError)
It could be parsed but the constraints were violated (fires validationError)
If you enable handling UI messages
additionally, the framework will then take care of creating the appropriate
message for the user:
Example: https://stackoverflow.com/a/48482544
I think the only way to combine the two sap.m.DateTimePicker and sap.m.MaskInput is to develop your own control . Documentation : https://sapui5.hana.ondemand.com/#/topic/91f1703b6f4d1014b6dd926db0e91070.
Another way is to just use the Placeholder of the DateTimePicker Input field. This does not provide the same functionality as a MaskInput, but helps the user which valueFormat is expected in the input when entering it manually.
If you have a binding in your input box, you could set the type in the binding to eg. sap.ui.model.type.Date. This way you get some automatic formatting when field validation is triggered. There are other types available and you could inherit from sap.ui.model.SimpleType to code your own.

How to customize email template in crm 2016 by code

I am using CRM 2016, and trying to customize email template by adding a dynamic data. I know that CRM allows to use only specific vanilla entities, but when I explorer an old code I found an option to use {0}, {1} etc' for injecting data from non vanilla entities (by code) - unfortunately that code cannot be tested...
Have someone heard or know about that way? is it possible? what to google for?
You can do this by manually typing similar marker what CRM is using. Note that this is not documented in SDK.
Dynamic Values For Custom Entities In Email Templates
In the template, where you want the value to appear, type within 2 brackets an exclamation point followed by the entity logical name. After the entity name, add a colon, and then the field logical name, ending it with a semi colon. If you’d like a default value if nothing was found, after the semi colon add the default value.
{!<entitylogicalname>: <fieldlogicalname>; <Default Text>}
More in part 2:
The Global Template Type is what you’d want to use for custom
entities, or any other entity not listed in the template type drop
down menu. And just to reiterate, regardless of the way you insert
values, whether you use the out of the box insert method or you
manually type it in, you can only insert values from one record.
Dynamic Values For Email Templates - Part 2
Dynamics' email templates are flawed. You either can't use custom entities or you have no translation. I use this workflow instead. It can do everything : https://github.com/rtebar/dynamics-custom-emails

I want to add a new Classification to the Coverity webapp

Right now the Coverity web api has the following options for the "Classification" field for each finding:
Unclassified
Bug
Pending
False Positive
Intentional
I'd like to add "Bad Practice" to the list. Is this possible?
No, you can't add element to the Classification list in Coverity.
You can add to the Action and Severity lists though. So these might fill your need.

Alter input of form before it is submitted

I'm creating a multilingual Drupal site and trying to implement a search function, that only displays results in the current language, that the user is viewing the site through.
Using Drupals own searchfunction at /search/node it is possible to select which language to search for through the "Advanced search" options, and it works perfectly. However, I dont want to expose these language selectboxes, I just want it to only search in the current language automatically.
What's the best option to do this?
I have one solution where I create a hook_form_alter function, that sets the #default_value in the language selectboxes to the current language, and then I hide the whole "advanced options" with in css. This doesnt seem very right though.
I think the most clean solution would be to hook into Drupals form-processing process and append ex "language:en" to the input text, but I cannot get this to work.
Does anyone know if it is possible via one of the Drupal form related alter functions, to get a hold of the input text and alter it before drupal does its final processing of it?
To answer your question specifically, while using 'hook_form_alter', you have a referenced variable called '$form_state'. This stores the values in the form, and any change there will be passed further.
Also,
I think setting a default value and hiding the field is a good solution as any, only, if you are hiding it you should do it server side, while altering the form. The same field you are setting the default value to. like this:
$fieldname['#type'] = 'hidden'.