Hi,
I have a date type custom field, i want to update its value by one month from the existing one how can i accomplish this using post function??
See https://answers.atlassian.com/questions/40763/how-to-set-a-date-time-customfield-by-postfunction - that code is more verbose than necessary but should get you on the right track.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot Jamie but this code is updating the date field value by current date but if want to update the value by current date+1 month then how can i use that code?
please guide me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let us suppose i have a custome field Release Date : 23/Mar/12 now i want a groovy which will automatically set this value to 23/Apr/12 when i will execute the transition.
Please help me to get out of this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can find this on the interwebs, it's the same in groovy as java more or less. Something like:
def cal = Calendar.getInstance()
cal.add(Calendar.MONTH, 1)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jamie, But is not the Solution of my problem,
I want like this
Let us suppose i have a custome field Release Date : 23/Mar/12 now i want a groovy which will automatically set this value to 23/Apr/12 when i will execute the transition.
I need a simple code for this.
the code you have given is not working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My psychic remote debugging skills are failing me today... so we will need more info than "not working".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it is throwing exception saying error in code can not find Calander and getInstance() still i have also given with package name still it is giving same error.
the code you have given in that where we are using the custom field name and id then how we can update the particuler custom field value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you post the entire code you are using, with correct formatting. To gist.github,com if you don't know how to do the formatting here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
def cal = Calendar.getInstance()
cal.add(Calendar.MONTH, 1)
where we are giving custom field name or id??
How will system identify to which custom field we want to update???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That was just an example for adding a month to the current date. The other code has an example for updating a custom field. You don't need to import Calendar when using groovy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Soory sir i can not upload the code due to some security reasons but i can tell you the scenerio,
i have one custom field named Release date it is having some value suppose 20/May/2012 now i have one transition in the jira flow and i want to update this custom field bvalue by one month that is 20/Jun/2012.
please help me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.