Hi All,
I have added filed like solution available date filed
The thing is automatically set everytime the ticket is edited based on the earliest date of the field "fix version".
Take into account that fix version is a multiple choice field, so we would need to choose the earliest of them.
Thank in Advance.
suresh.
You could write yourself a new calculated custom field (instructions here) and put code in the getValueFromIssue method to loop through your issue's fix versions to get the earliest release date.
Calculated fields are automatically recalculated every time the issue is updated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We use the Jira Workflow Toolbox add-on that has a Calculated Date-Time field custom field type. The configuration expression for this custom field is: min(releaseDates(%{Fixed versions}))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's correct.
You've looked at the link I gave? It contains links to pages explaining how to set up your plugin development environment. The 'Last commented user calculated field' example is close to what you need except you'll have to replace the comment logic with your earliest fix version release date logic.
See the JIRA API for details of the available methods that you could use. The Issue and Version classes are the ones you'll need - look at Issue.getVersions() and Version.getReleaseDate().
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes i have seen and i have done plug-in
In the getValueFromIssue method i am getting fix version from issue.
1.But how to get the release date (from that how get instance to the version Interface so that i ll call release date).
2.Once i ll get the release date How i can set in the vm file
in method getValueFromIssue returns "releaseDate"
and vm file value="$releaseDate" Is it ok???
<input type="text" name="Sloution available Date" value="${ReleaseDate}"/>
thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You want getValueFromIssue() to return the earliest release date for the issue's selected versions not the fix version otherwise your custom field will display the fix version not the earliest release date.
So in getValueFromIssue() get all the issue's selected versions and check each one in turn to see what its release date is, and return the earliest one.
I've already told you how to get the release date for each version: Version.getReleaseDate(). You shouldn't need to mess about creating velocity templates - just use the same ones that the JIRA date custom fields use eg
<resource type="velocity" name="column-view" location="templates/plugins/fields/view/view-datetime.vm"/>
<resource type="velocity" name="xml" location="templates/plugins/fields/xml/xml-date.vm"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is no method in issue object like getVersions() it has only getFixVersions() and getAffectedVersion() methods for version related.
So how to get issue's selected versions.
And also where should i get vm files like view-datetime.vm and xml-date.vm
Please Helpout this. thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ComponentManager componentManager = ComponentManager.getInstance();
List<Version> versions = componentManager.getVersionManager().getVersions(issue.getProjectObject().getId());
Iterator it = versions.iterator();
for (inti = 0; i < versions.size(); i++) {if(it.hasNext()){
System.out.println(it.next());
I am getting issue version in to the list then how to get release date from version
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So i need to develope plug-in.Once i have done calculated custome filed i have to add the custome fileds to corresponding screen.
Is it correct?
Do you have any sample snipts for this so the that i can fallow(logic inside getValueFromIssue method)
B'coz I am to the JIRA API.
thanks