I have a custom field in Jira and I want to set the value on the field to match the current user.
This seems as though it should be fairly easy, but it has stumped me. I have trawled for information and have been led to using post functions.
Post functions don't seem to actually pre-set the value of fields on the create issue screen unfortunately? I am able to set a value which appears on the issue once it is created using a post function but I cant seem to find a way to set the value on the form itself.
Is this possible?
There is Default Values for 'Create Issue' screen plugin which seems to be doing exactly what you want.
Related
I am updating my custom field pro-grammatically if custom field is left blank. I found a question on stack related to this which helped in saving/updating custom field value correctly.I referred this stack question .
As I said I am updating custom field if it is left blank. So I have written some java code which checks if custom field is null if yes then I am generating some values using java code and updating and saving value in database. This all is working fine. I am doing this all when create issue.
But when issue page is rendered the respective custom field is not displayed,it need an extra page refresh for that. After page reload the custom field is rendered on page with correct value.
Any ideas? Why page reload is required ?
Can some point me to write direction ?
I am using JIRA 6.0.x
I am writing code in MyCustomField extends AbstractSingleFieldType class and using its getVelocityParameters method
Check your log files for errors seen the first time the screen is loaded? May also be errors shown in the JavaScript console? Otherwise strip everything back to be as simple as possible and then add complexity back in until it breaks in the same way.
I have a custom list. Each item in the list has 39 fields/columns that need to be filled out and a 40th field that gets filled out by a separate workflow.
I have another workflow that I need to trigger if any of the fields change EXCEPT for one.
Why? Because that field has a custom ID# in it and that field gets populated AFTER the form is submitted. Therefore, there will ALWAYS be a change in the list item. Thus, I need a workflow to trigger when any fields change EXCEPT the one w/ the custom ID#.
Any ideas? Thank you.
No one has been able to answer this but I figured it out myself.
I'm including the answer here in case anyone else ever comes across this and finds it helpful:
Create a new field that you will hide from the your SP list and from NewForm.aspx, EditForm.aspx, and DispForm.aspx.
Using jQuery, populate that hidden field as such: $(":input[Title='fieldName']").val("1");
The using an SPD workflow, check to see if that field = 1. If so, run the workflow. AND at the end of that workflow set the field to 0 - that's important.
I'm sure this is an easy fix but I can't seem to find it. I just have a form, that will be a subform of another, that needs to display the results of a query.
The query is simple enough, just displays all fields of records that fall between specified dates. The query works great, but when I attach it to the form as its record source it doesn't display the data. I can see the correct amount of record selectors so I know its understanding the query but its as if all fields are hidden!
I have also tried building a query to the forms record source that was simply Select query.* From query. Oddly I have had this working before but I had to specify every field. What I mean is:
Select title From query
Select type From query
Select date From query
...
And so on for all the fields but this seems foolish, can anyone think of what I may be doing wrong?
Thanks in advance!
Edit, forgot to mention I also tried the foolish solution that I mentioned above and it didn't work so its definitely some issue that I'm not seeing, some property that's probably not appropriately set
#sshekhar well its not really code at the moment I'm using Access 2010. I have a form that needs to display a subform that executes this query of displaying records that have a data field that fall between dates specified by the user. The query works and displays the correct records, but the form that it is attached to only shows the record selectors and all the fields appear to be "hidden." I thought it may be one of the form's properties set incorrectly but I checked on the test form from another database that I used and each have what appears to be identical settings. So I'm at a loss!
So it turns out even though I using a query that holds all the fields it will not display the content unless you go to the Add Existing Fields and add all the the fields you want to see. This seems really silly especially when the results in the query but at least its working now.
I had this problem and discovered that having the property DataEntry set to YES will only display new records. From Microsoft Help:
You can use the DataEntry property to specify whether a bound form
opens to allow data entry only. The Data Entry property doesn't
determine whether records can be added; it only determines whether
existing records are displayed. Read/write Boolean.
I needed to create a input mask for a jQuery datepicker in my Rails app, where the first form field uses m/d/yy format and the datepicker populates a hidden input with the proper database format.
I was using SimpleForm, and so I extended my own input so that the input is preceded by the mask.
I got everything set up and when checking out the browser, it all just worked well before I thought I would be done.
The form ends up with two inputs for the same attribute, each with the same id and name. I never thought this would work. Checking the development log I only see one date getting submitted, the second of the two which is the one that has the proper format for the database.
Is this all okay? Should I take some extra steps even though this appears to work fine, and more importantly, can someone explain what's going on under the hood that results in this behavior?
Thanks!!
Rails uses the Hash params to store fields submitted. When you declare two or more inputs using the same name, it happens the same as if you do something like
h=Hash.new
h[:name]="foo"
h[:name]="bar"
Result is bar because the foo was overwritten. So the "winner" is always the field value which the browser last appended to postdata.
But if I where you, I would not rely on the browser that the second field gets appended at last.
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}