Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JMWE - Create / Clone Issue(s) Post-function do not select parent issue

Gleb Kartashov
Contributor
July 15, 2020

Hi. I'm using Create / Clone Issue(s) Post-function to create issues conditionally and there is "Parent Issue" option. I do not want to select a parent issue for newly created issues.

Putting null or not putting anything there results in

ERROR jadmin 788x9789x2 fdhlyq 10.0.0.189 /secure/WorkflowUIDispatcher.jspa [c.a.jira.workflow.OSWorkflowManager] Caught exception while attempting to perform action 21 from workflow 270802 on issue 'AP-41'
com.opensymphony.workflow.WorkflowException: An error occurred while executing a Create / Clone Issue(s) post-function: Create Issue post-function: calculated parent issue should be a String : root cause: Create Issue post-function: calculated parent issue should be a String

 

2 answers

1 accepted

0 votes
Answer accepted
David Fischer
Community Champion
July 15, 2020

Can you share a screenshot of the post function configuration?

Gleb Kartashov
Contributor
July 15, 2020

parentIssueNull.PNGparentIssueEmpty.PNG

 

Both result in said error

David Fischer
Community Champion
July 15, 2020

I meant the whole post function configuration, to see why the patent issue option appears. I'm any case, you can try changing from "calculated" to another option, it will get rid of the error. 

Gleb Kartashov
Contributor
July 15, 2020

I've selected "Another Issue" option and didn't fill in the field (no issue seleceted) and this config still results in same error

Full post function:

issueCreateFull1.PNG

issueCreateFull2.PNG

David Fischer
Community Champion
July 15, 2020

Did you try with the default value when you select "Calculated" as the issue type, which is "Current issue"?

Unless you are creating a sub-task (which the post function cannot know since the issue type is calculated at runtime), the parent issue will be ignored.

Gleb Kartashov
Contributor
July 15, 2020

Well the thing is that newly created issues must not have a parent issue

Gleb Kartashov
Contributor
July 16, 2020

Ok so this kinda worked. But

Calculated issue type script has 2 possible outcomes - for 1st issuetype everything works fine, but 2nd issuetype create function results in missing fields error for some reason though both issuetypes share same fields and even screens. Only difference is workflow

An error occurred while executing a Create / Clone Issue(s) post-function: Issue could not be created because of validation errors: Reason(s): VALIDATION_FAILED Field error(s): Field customfield_10225: is required. Field customfield_10226: is required. Field customfield_10218: is required.

All 3 customfields are set in  Set fields of new issue section of the post function (Groovy scripted). I have no idea why is this happening

David Fischer
Community Champion
July 16, 2020

It could be because these custom fields don't appear on the Create screen for the issue type. I recommend you try to manually create an issue of the second issue type and make sure you can pass all the required fields.

0 votes
Zehra Atmaca April 21, 2021

Hi @David Fischer ,

When transitioning the ticket to assign it to a project by selecting a project on the transition screen, customer get the following error:

An error occurred while executing a Create / Clone Issue(s) post-function: Issue could not be created because of validation errors: Reason(s): VALIDATION_FAILED Field error(s): Field issuetype: The issue type selected is invalid. : root cause: Issue could not be created because of validation errors: Reason(s): VALIDATION_FAILED Field error(s): Field issuetype: The issue type selected is invalid.

Validator error.png

 

When they retry to transition but by assigning to another project, that goes well.

The error message is referring to validator. The transition contains 2 validators created with JMWE which I've already checked. 

Can you help us with this problem?

David Fischer
Community Champion
April 21, 2021

Hi @Zehra Atmaca ,

the error message is not actually related to a Validator. The problem is in the Create/Clone Issue(s) post-function that's placed on the transition that is specifying an invalid issue type. It's probably because the issue type is not valid for the destination project.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events