Forums

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

Copy from Trigger Issue does not work

Ipsen Logistics
Contributor
April 21, 2020

Hello,

I am creating a related issue in my rule. During creation I try to copy some values to the new created issue.

The new issue was created as a related issue with the labels, summary and decription I wanted.

In addition to that I use 'copy from trigger issue' to set some of the fields in my created issue.

All fields stay empty after the rule fires on the create-trigger of the trigger issue. If I trigger a test rule doing the same things manually from that issue it works properly.

What am I doing wrong?

grafik.png

 

2 answers

0 votes
Ipsen Logistics
Contributor
April 24, 2020

It seems that I fired to quick: Sometimes it is working....

And I do not know how to fix this. All other values get filled correctly:

- Summary

- Link type

- Lable

- Component

 

So only the "copy from trigger issue" seems to be unreliable

 

Any Idea`?

John Funk
Community Champion
April 24, 2020

Can you post a screenshot of the rule you currently have? 

And any error or message in the audit log?

Ipsen Logistics
Contributor
May 4, 2020

Yes I have an example. In this case the field is used to add to the summary.

Screen_1.PNGScreen_2.PNG

As you can see I want to update the summary field with additional information from a custom (string) field. One of the two gets filled so that there is one more value after the dash sign.

It is not working with issue.customfield nor triggerIssue.

 

Thanks & best regards

AK

John Funk
Community Champion
May 4, 2020

Not that it should matter, but first I would put a space between the two fields.

Next, make sure that the Customfield this is not getting populated has access to the project. 

Finally, can you share what the Audit Log says when it fires?

Ipsen Logistics
Contributor
May 5, 2020

Hi,

the custom filed should be configured correctly as it works in other cases. Here the screenshot of the latest trigger:

Screen Log.PNG

 

As you can see the condition in the rule does not match. But when I create a filter with the same JQL condition it matches correctly.

By the way: I added another 'Re-fetch issue data' after I got the error.

Ipsen Logistics
Contributor
May 5, 2020

>>Customfield this is not getting populated has access to the project

could you explain? The mentioned field is configured in all screens.

John Funk
Community Champion
May 5, 2020

Can you share the Condition that you have? 

Ipsen Logistics
Contributor
May 5, 2020

Condition to set summary was:

issueType = Adressdatensatz AND "Firma - Name 1" is not empty

John Funk
Community Champion
May 5, 2020

And you can confirm that "Firma - Name 1" field is not empty when you create the original issue for SD-10202? 

And how are you creating that issue - through the normal create button? API? Service Desk portal?

Ipsen Logistics
Contributor
May 5, 2020

I am using proFormaForms for Jira Service Portal to create the issue. The create trigger is the event that I am trying to handle. The If, then, else conditions are used to create other issues or to add the name to the summary.

I can confirm that the field is not empty as it is mandatory in this case to create the issue .

I tried to reproduce the error with different browsers but I could not. The error occurs only sometimes and I do not know under which conditions. It does not seem to be a browser issue - the issue is always created the right way. Only the conditions or smart values seem to make problems: The condition does not match, when I create the same condition as a filter it matches the issue.

John Funk
Community Champion
May 6, 2020

Ah, I suspected as much.  I ran into the same problem. :-)

I had to move the field out of the form and put it in the Request types Edit Fields part. 

I suspect that the sync of the field when in Forms to the database field in Jira does not happen fast enough to be able to use the value from the database. Even with a Re-fetch - which is exactly what I tried. haha

But when I moved it from the Form to the Request types, it was able to copy it over in the Automation rule. 

I need to let both the Automation folks and the ProForma folks know that. I have just been lazy to do it after I found the situation last week. 

Ipsen Logistics
Contributor
May 6, 2020

Hello John,

ok, this may be the reason it sometimes works sometimes not. If I understand the issue could be solved by a workaround:

  1. Create the issue from the form
  2. Use another trigger after the issue was completely created
  3. Create conditions in this trigger to handle the jira fields correctly

 

Am I right with this workaround? And: Are you gonna inform the guys and open an issue for that?

Thanks & best regards

AK

John Funk
Community Champion
May 6, 2020

Yes, I will inform them today. 

The problem is with number 2. I don't know how long that process takes for the issue to be completely created with the database fields all updated. So there is nothing that will cause the rule to wait for sufficient time until the DB field us updated to run the rule.

My work around is:

1. Go to Project Settings

2. Click on Request types

3. For the Request type affected, click on Edit fields

4. Click on the Request form tab

5. Click on Add field for the Visible fields section

6. Add the database field you will be copying from there

7. Go to the ProForma form and remove that field from your form so it doesn't show up twice.

8. Then your rule should start working - no reason t change it. 

Ipsen Logistics
Contributor
May 6, 2020

I understand your shown workaround. I assume that persisting the issue to the database will not take minutes ...!?

I need the form containing the field as I am using a lot of conditional logic to show sections of the form.

So I will try my workaround first and read the fields 'later'. If this also does not work I will follow your advice!

Thanks so far! I will let you know if I am successful.

AK

Like John Funk likes this
Ipsen Logistics
Contributor
May 6, 2020

Hello John,

I updated my process:

  1. Create Issue
  2. Scheduled trigger to run my rule

 

Today I had the first request: The rule run 4 minutes after the issue was created in the portal. All fields were filled but Firma - Name 1 not.

This is especially strange since the created issues also access the field and it runs correctly. I do not know if this is a proove that there seems something else wrong ...

rule.PNG

Best regards

AK

Ipsen Logistics
Contributor
May 7, 2020

John,

I found the error after I changed the process as mentioned above:

one of the fields was not configured or was deleted from one of the screens. I think this was because I shared a sreen scheme with another project and the owner deleted it.

Sorry for the confusion! I will let you know if it works now.

Best regards

AK

Like John Funk likes this
Ipsen Logistics
Contributor
May 7, 2020

I opened up a ticket at thinktilt. Some of the values from the form are not saved after hitting the create button in the portal.

So I edited the form saved it again and then submitted it. This way it works but you have to fill the values twice due to the error. It occurs with several different browsers.

John Funk
Community Champion
May 7, 2020

Yeah, I ran into the same thing myself. Glad you found it!

0 votes
John Funk
Community Champion
April 21, 2020

Hi Ipsen - You might try inserting a Re-fetch issue component and then doing an update. 

Ipsen Logistics
Contributor
April 21, 2020

Hello John_Funk,

thanks for the reply! So I add this component right before the issue creation?

Best ragrds

AK

Ipsen Logistics
Contributor
April 21, 2020

I added it before the issue creation and it is working!

Thank you very much & best regards

AK

John Funk
Community Champion
April 21, 2020

Great - glad it is working for you! It was a little hard for me to follow in German ;-)

Ipsen Logistics
Contributor
April 21, 2020

Sorry for that: The screenshot is indeed an example! So I think my additional information was useful! It took just minutes to get it solved with you answering me! Great! Thanks once more!

AK

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events