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

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

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.

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

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

303 views 1 18
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you