I've read the documentation, but I haven't found the syntax for the formule to display the fixversion release date for the issue. Is this possible with this plugin ?
(I will enforce only one fixversion for the issues)
Ok, the correct (and tested) formula is:
<!-- @@Formula: Collection versions = issueObject.getFixVersions(); if (versions==null || versions.size()!=1) return null; version = versions.iterator().next(); return version.getReleaseDate(); -->
David, thanks a lot! it works great, however it displays only: "in 4 months"
Can we force it to display the real date ?
Also if you could get chance, could you take a look at my other question ?
Yes, it does. However, I had to update my initial response because the code what somewhat garbled by the conversion from answers.atlassian.com to community.atlassian.com.
Also, note that it only works if you have a single fix version on your issue.
Although I can't test it right now, I'd say you could create a Customer Date/Time Field with the following formula:
Collection<Version> versions = issueObject.getFixVersions(); if (versions==null || versions.size()!=1) return null; Version version = versions.iterator().next(); return version.getReleaseDate();
Thanks David, I've tried running your suggestion using the Misc Custom Date/Time
<!-- @@Formula: Collection<Version> versions = issueObject.getFixVersions();
if (versions==null || versions.size()!=1)
Version version = versions.iterator().next();
return version.getReleaseDate(); -->
My field is not getting shown on the screen where it's supposed to be.
Hi David, the method you suggested works great, but I'm running into an issue with re-indexing when the Release Date value is updated on the Version.
Currently, if I update the Release Date value on the version it's not re-indexed until I manually update the issues linked to the release. Is there anyway to get the ticket re-indexed when the Release Date value is changed?
Unfortunately, that's a limitation of JIRA - there is no mechanism in place to track dependencies between fields and the objects they depend on. Also, there is no way to run code when a version object is updated.
However, you could try automating a full reindex every night for example.
I can't help with displaying it on the issue page in JIRA, but if you only need it in a report on the issue, check out Intelligent Reports. It can easily show any aspect of the version in a report on the issue. Best of all it's quick and simple, design your template in Microsoft Word, and set up simple point and click rules to fill in the data - no programming language or API to learn.
Unfortunately, the date is displayed using JIRA's default settings.
If you want custom formatting, you need to create a Text field instead - but of course this won't be searcheable or sortable as a string then...
I believe I could make an improvement to the calculated Date/Time fields to support selecting a different formatting option (I'll need to chek though), but this would require some work. Can you post an enhnacement request on our JIRA?
David Fischer I saw that this was resolved in https://innovalog.atlassian.net/browse/JMCF-102. I have version 1.5.11 of the plugin which I believe to be the latest but the <!-- @@Format: DATE --> isn't working for me. Wasn't able to comment in the jira project sorry for putting it here.
Unfortunately, you are right. This is due to an "improvement" in JIRA 6, that displays dates "smartly". For example, it will display "just now" for a date that represents now, but it will automatically update (without any user action) every minute, to display "one minute ago" a minute later. You should create a new issue on our issue tracker: https://innovalog.atlassian.net so that you can track its resolution, and I will try to fix it in the next release.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs