Issues with Linked Clones showing incorrect resolution status in Issue list views

Chuck Vanderwist March 19, 2013

Issue workflow for one issue type ("Blueprint)" creates CLONES (Using Groovy/Script runner), using issue type of "Specification" and "Test Plan".

  • The "Blueprint" issue type uses the JIRA default "Resolve" screen for the final "Resolve" transition.
  • The "Blueprint" issue type has the following post funcitons applied to the "Resolve" transition:
    1. Clones a new issue (Type: "Test Plan", Link type: "Relates to")
    2. Writes a field from the "Blueprint" issue to the linked "Specification" issue
    3. Sets a Custom Field in the "Blueprint" issue to "TRUE"
    4. Sets Summary field of "Blueprint" issue to "Blueprint Complete - Published"
    5. Standard JIRA post functions (Set issue status, Add comment, Update Change history, Reindex, Fire event)

When I resolve this issue using the appropriate transition (And JIRA default "Resolve" screen)

  • Set Resolve status to "Published"

Now when I OPEN the issue and view status, it shows:
Status: Resolved

Resolution: Published

HOWEVER... when I view this issue in a list (such as "Issues" screen in project, or "Assigned to me" on dashboard... it shows:

Status: Approved (This is the workflow status I was in before I clicked "Resolve issue")

Resolution: Unresolved

Additionally- This is causing problems for my VALIDATE functions in the other issues, since they're set up to confirm that Blueprint issue status is RESOLVED before they can be moved to Resolved/Closed statuses.

About my "Clone issue and links" post functions:

  • No Conditions
  • Target Project = Blank (Same as current issue)
  • Target Issue type = "Specification" or "Test Plan"
  • Additional Issue Actions = issue.summary = 'New Test Plan'
  • Link Type = Relates

After reviewing this question: https://answers.atlassian.com/questions/109548/issue-navigator-showing-erroneous-status-and-resolution I have noticed that deleting the links to ALL cloned issues is the only way to get the resolution and status to display correctly in the issue lists!

(The problem description sounds very close to mine too)

HOWEVER -

The answer on the aforementioned question link is not clear - if the script is "not indexing the new/updated issues", how do I fix this? Is there a bug in the groovy script runner? I have followed all instructions and reviewed all groovy documentation for "Clone an issue and links" post function. I can't figure out where I'm going wrong.

It is very important that we are able to properly resolve issues while retaining the links to our "Clones" in the project. Please help!

1 answer

0 votes
Chuck Vanderwist March 19, 2013

Moved the "Clone issue and links" post function that is on the "Resolve" transition for "Blueprint.

After thinking about reindexing and issue links, I thought the "Test Plan" cloned issue may be the culprit, since it is executed upon "Resolve" transition for the Blueprint issue.

I moved this issue down in the Post Function list - it is now between "Reindex" and "Fire event" JIRA default post functions. This fixed the status problem for the Blueprint issue.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2013

The reason for this very specific ordering is a jira bug by the way... https://jira.atlassian.com/browse/JRA-31775

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2013

Not quite sure I understand this answer... have you solved the problem? Did you see the info note in the docs: https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Clonesanissueandlinks ?

Which says:

Due to indexing changes in JIRA 5.1, this post-function should be placed immediately after the function: Re-index an issue to keep indexes in sync with the database. If you don't do this, the parent issue will not be indexed correctly.

Suggest an answer

Log in or Sign up to answer