We have one date field and after certain transition I want to set the date to tomorrows date for the date field using java script.
We are using jira 5.0.6
Just to be clear on your requirement
Reading your question implies the process should be:
That's all fine up until the point at which you say "using javascript", because javascript runs on the client's browser. The transition happens on the server and you can't run javascript there. This is why you'd need a "post function" to do the work
However, I suspect that's not what you meant, and what you actually want is:
That is indeed a javascript trick
I dont know whether this is possible using javascript but a better approach is to create a post function which will set the value of the date customfield to tomorrows date.
Post function can be a plugin or a groovy script (using script runner plugin) .
A similar groovy script example is here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a task of a post function , how will you identify that a certain transition has taken place using javascript ?
A reference to set the date is here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mizan,
we need to do this in a transition called "approve" ..while doing an "approve"...the date field value should be automatically set to tomorrows date.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.