In DataTime type Deadline field I want change default value only for time in time input. Not Deadline field value (this I want still have empty by default). How can I do this?
I'm copying my reply from the support ticket you submitted.
Unfortunately, there is no way to configure this field as you requested.
Related
How do you save an input value, with input field disabled, although you have specified a value?
The value for #vat_rate is not being saved:
<%= f.text_field :vat, value: #vat_rate, disabled: true %>
If disabled is set to false, then the value gets saved to the :vat column. Why?
A company is registered for vat at 20% so they are not allowed to change it without approval. On their invoice form, the 20% is displayed and cant be edited. That's how I want it. I want the field to be disabled while making the 20% visible.
I'm just going to complete #Vasfed's answer: disabled fields are not sent to the browser. You could use a hidden field, but please don't (again, see #Vasfed's answer).
To store a value in the session in Rails, you can just set it to session[:key] = 20, but it might not be the best idea: you could just re-compute it, or re-fetch it from the DB when you need it.
Do not trust data from the clientside, user may alter your page and gain something from setting other values.
You can for example pass value in session, or via some other way - calculate/fetch it again in create/update action.
I am trying to format an input field of the type xs:date in Orbeon.
I have tried using the xxf:format attribute, but the datepicker can not understand the date when it has been modified.
The idea now was to change the javascript of Orbeon to use the xxf:unformat attribute to interpret the date and transform it back to ISO format.
I've tried changing the data.js but for some reason none of the changes can be seen.
Am I changing the wrong file?
Edit
I figured out that the xforms.js has a function 'getCurrentValue' which is being as the changes I do there are visible. Now I just need to figure out who is the one that's calling the function.
Edit:
It is the Calendar who requests the value of the input when the user clicks on the symbol. This all happens at the client side, and the generated HTML does not have the format/unformat attributes. However I want to use their value. Can I make a request to Orbeon to get it? How?
In case you're using an xf:input bound to a node of type xs:date, you can control the formatting of the date field with the oxf.xforms.format.input.date property. A few formats are supported, and if you want to add more, the best would be to follow the pattern currently used for the currently supported formats.
E.g.
[M]/[D]/[Y]
[Y]-[M01]-[D01]
My tfs task work item has a state rule that sets the default value of the 'remaining effort' based on the value of the 'estimated effort' field. Essentially the 'estimated effort' field is for the original estimate and the 'remaining effort' field is for updated esitmates as the user works on the task.
In order to save the user some time, I created a rule that defaults the 'remaining effort' field to the value of the 'estimated effort' field. I used the default as I only want it to get filled in if the user forgets to enter a value themselves. As far as the item edit window, this seems to work fine. The value appears in the 'remainig effort' field and if the task item is re-opened the value is still displayed in that field.
However, even if the item is saved, the value never appears in the query table and is not represented in any report. I can fix this by deleting the value, saving the task, re-entering the value and saving it again but since this negates the value of the state rule, I'd rather not use this method.
Any ideas?
I am using Visual Studio 2010 with a scrum plugin for TFS.
Is there a way to disable a configuration field for a JIRA gadget based on the value of another field?
Example: when the user chooses 'Now' for field Foo, then the Date field is ignored. I'd like to disable the Date field. Can this be done? If so, how? I already do the ignoring part. But my only clue for the user that I am ignoring the Date field is my description for Date and Foo. It would be nicer to disable the Date field as well.
If you want to do anything other than use the built-in gadget controls with their standard behaviors, you need to implement your own gadget configuration code instead of relying on the UserPrefs directly.
This means that, in practice, that you need to omit the "configuration form" from your gadget descriptor, which is this part:
config: {
descriptor: function(){...},
args: {Function, Array}
},
After having removed that, your gadget will then need to build its own UI and decide itself whether or not it still needs to be configured, as well as call gadget.getPref() and gadget.savePref() to get/set your user's gadget configuration options in the parent container.
I should add that this is a fair amount of work. You might be able to do some hacky jQuery to override the standard controls built without doing the above, but this will not likely be portable to different parent containers (or even different versions of JIRA).
Question using Grails 1.3.4 - the 'scale' constraint does not seem to keep my decimals.
I have a field defined as: Float latitude
I have a constraint: latitude(blank: false, range:-360.0f..360.0f, scale:6)
The Oracle 10g field is defined as: NUMBER(10,6)
When I enter a value in Create or Edit, the correct value gets to the database. However, it never displays correctly in Show. If I enter 10.1234567 and update, 10.123457 is in the database but 10.123 displays in Show.
If I Edit, the value shows as 10.123, and if I update without modifying it, 10.123 will be stored in the database, replacing 10.123457 even though I never touched that field.
If I edit the value to 10.456789, but leave another required field blank, the resulting Edit screen with the error message displays the value as 10.457.
Why is Grails continually rounding the value to 3 digits? I tried the field as a Double as well, but same results. I thought maybe it was Oracle, but I tried it with the default dev database, and same result. I thought maybe it was the 'range', but I took that off with the same result.
Hmm - are you sure it's displaying correctly in your database viewer? Also - check your use of tags: See http://www.pubbs.net/200908/grails/38057-grails-user-how-does-rounding-of-decimals-work-in-gsp.html
Wasted too much time trying to figure this out, ended up using the solution suggested by snowmanjack.
The default data binding that occurs with the fieldValue call is truncating it. You can write a new data binder that handles conversion the way you want as described here http://grails.org/doc/latest/guide/single.html#dataBinding
Or you can do the lazy, probably less safe method that I used and access the property directly.
I replaced.
${fieldValue(bean: countryInstance, field: "latitude")}
with
${contryInstance.latitude}