Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×We have a end date custom field we mention a end date during creating a issue, when it reaches automatically a transition should happen from Status A to Status B.
Thanks,
Raj
Hi @Raj Kumar,
If you can explore custom development as an option, then you can write a scheduler which wakes up and scans the JIRA issues (You can limit the scheduler processing to a specific project and specific status, based on your requirement) and execute the transitions/ change the status.
Regards,
Ravi Varma
In the mean time between the scheduler waking up and the field being updated the ticket would be in an inconsistent state. Not the most elegant solution imho.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Beppe Marcon ,
The scheduler can be run every 1 minute or 30 seconds.
Unless, all the created issues have the same end date, accurate till the 1 minute/30 seconds, which is highly unlikely, the scheduler should be processing few issues whenever it is triggered.
Changing the status for less number of issues, should not take much time.
If JIRA has performance issue due to high usage, I agree with your statement that the scheduler approach would have some latency, which is a known and accepted risk for any automated solution.
Regards,
Ravi Varma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You would need an add-on for it.
For example, you could use the Power Scripts add-on:
With this add-on you could create a job, which is run by schedule. In this job you would select all issues with expired end date and auto transition such issues.
Your code would be like this:
string jql;
jql =
"'End Date' < now()"
;
string[] keys = selectIssues(jql);
for (k in keys) {
autoTransition("Transition Name", k);
}
You can find how to create a schdule job here:
https://confluence.cprime.io/pages/viewpage.action?pageId=6558186
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The job would need to run very often and still there would be times of inconsistency before the job is called. Not very scalable and pretty dangerous imho.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
just define k and make autoTransition non-camel and you're good to go:
string jql;
string k;jql =
"'End Date' < now()"
;
string[] keys = selectIssues(jql);
for (k in keys) {
autotransition("Transition Name", k);
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.
You could but it would not work consistently. The reason is the event is triggered the moment the issue is being updated but is not finalized yet, the transition would try to transition the issue and find it in an inconsistent state and fail.
Apparently Jira cannot trigger transition based on field value update event.
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.