Hello,
I am trying to find out how to calculate the difference between two dates custom field and use the result to set another field number data type using JMWE set fields.
i was going some YouTube videos ( https://www.youtube.com/watch?v=9TKKHCckJD8) but in this required to install other addon, In my Jira environment we're using JMWE addon, i was thinking that if we use some scripts to create custom filed.
Let me know your suggestions please!
Thank you in advance
Regards,
Channakesa Chindanur
The advantage of using the JMCF app is that it allows you to create a new duration field (similar to, say, the "Original Estimate" field in terms of formatting), and that field will be updated automatically.
With JMWE, you'll be able to update a custom field with the difference between two dates, but:
I recommend using JMCF, but if you use JMWE, the value script will be the same. For example:
secondsBetween(issue.get("Start Date"), issue.get("End Date"))
which returns the difference as a number of seconds (you can always divide the results by 3600 to have a number of hours, or 86400 to have a number of days)
Hi David,
It looks like it'll help our requirement using above script in JMWE addon, but where do i need to add above script as in my env showing groovy template PFB.
it will be helpful if you can give right script to add.
Regards,
Channakesa Chindanur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
O/p for above script, but still not reflecting in my Jira issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As I mentioned earlier, this script is meant to be used either on a workflow post function such as the Set Issue Fields post function, on the transition where you set the End Date field, or on an event-based action that listens to changes to the End Date field.
Please read the JMWE Server/DC documentation for details.
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.