JqlQueryBuilder builder = JqlQueryBuilder.newBuilder();
createdBetween(startDate, endDate)
now you have the result from start date to end date.
you just set the date format by using formater.
now you can long milliseconds1 = startDate.getTimeInMillis();
long milliseconds2 = endDate.getTimeInMillis();
long diff = milliseconds2 - milliseconds1;
long diffSeconds = diff / 1000;
long diffMinutes = diff / (60 * 1000);
long diffHours = diff / (60 * 60 * 1000);
long diffDays = diff / (24 * 60 * 60 * 1000);
System.out.println("\nThe Date Different Example");
System.out.println("Time in milliseconds: " + diff
+ " milliseconds.");
System.out.println("Time in seconds: " + diffSeconds
+ " seconds.");
System.out.println("Time in minutes: " + diffMinutes
+ " minutes.");
System.out.println("Time in hours: " + diffHours
+ " hours.");
System.out.println("Time in days: " + diffDays
+ " days.");
you can get expected result.
componentManager.getJiraDurationUtils().getFormattedDuration(remaining)
Well, that will convert a long to days based on the information you have put into timetracking.
To get working days between two dates you might need to dig into the greenhopper config, where you can specify what are not working days.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To get days between two dates I have used jodatime API which is already in jira classpath. But I am looking for a utility which just takes weekends (jira configuration of working days) into consideration while calculating days between
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.