When I export User Stories out of Jira Align I see fields for Epic Name, Epic #, Feature Name and # and User Story Name and Number. But I do not see any reference to Capabilities fields. And If I go to the Capabilities section in Align, there is no Export function. Export only seems to be allowed at the Features and User Story level, not at the Epic or Capability level.
I know I must be missing something simple, because there is no way that Atlassian would just leave out the Capability part of the User Story hierarchy in the export after all of these years.
Also, even though Align stores the Jira data synched through the connector, none of that comes out in the export either.
My guess is that your logic is broadly right, but your equivalence checks (==) are not.
For example, getIssueType() will return an issueType object, not a string, so your check for "is not epic" is always going to return true. Similarly for resolution
A little more formally (I'm happier in Java than groovy for this), I would try:
if ("Epic".equals(issue.getIssueType().getName()) && ! issue.getParentId()) {
// Resolution is Done or Fixed on Dev?
if ("Done".equals(issue.getResolution().getName()) || "Fixed on Dev".equals(issue.getResolution().getName())
The comments one might be ok as it is. I'm not sure of issue.getParentId, I think that's ok too, but might be wrong.
Hi, Nic,
Thanks for your reply. I tried your suggestions and I think I might be getting somewhere. I added these lines in as a debugging aid:
if (! "Epic".equals(issue.getIssueType().getName())) { log.error("Issue type is NOT Epic (good)") } else { log.error("Issue type is Epic (no release comments needed)")}
if (! issue.getParentId()) { log.error("Parent Id is null (good)") } else { log.error("Parent Id is not null (subtask)")}
if ("Done".equals(issue.getResolution().getName())) { log.error("Resolution is Done (good)") } else { log.error("Resolution is NOT Done (but is it Fixed on Dev?)")}
if ("Fixed on Dev".equals(issue.getResolution().getName())) { log.error("Resolution is Fixed on Dev (good)") } else { log.error("Resolution is NOT Fixed on Dev")}
if (issue.getCustomFieldValue(releaseComments) == "") { log.error("Release comments are empty") } else { log.error("Release Comments are NOT empty")}However, it does not like this bit:
"Done".equals(issue.getResolution().getName())as it gives the error:
java.lang.NullPointerException: Cannot invoke method getName() on null object at Script133.run(Script133.groovy:17)
Now, Resolution has a default value of Done on the Resolve Issue screen, which is displayed before the script is executed. So, for me (ex-mainframe programmer), issue.getResolution() should not be null. But what do I know?
Andrew
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.