Unable to copy data from parent to child cards using Jira automation

rupa_srivastava July 8, 2020

I have created a simple automation rule that will copy the sprint from parent to child when an issue is created.

But when the rule runs it gives me an error "Cant find the rule to copy from". Please suggest

2020-07-08 15_37_05-Window.png

2020-07-08 15_36_01-Window.png

2 answers

2 accepted

0 votes
Answer accepted
Bill Sheboy
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.
July 8, 2020

Hi @rupa_srivastava 

Several recent community posts indicated timing issues with the create issue trigger.  To avoid problems consider adding a re-fetch action.  For your rule, it would flow like this:

  • Trigger: create issue
  • Action: re-fetch the issue
  • Condition: if it is one of the issue types you wanted
  • Action: edit issue to copy the sprint from the parent

Also adding to what @Randy suggested, if you need to handle sub-tasks you will need to use an if/else structure around the edit: if there is an epic link, use the epic as the parent; else use the parent.

 

Best regards,

Bill

rupa_srivastava July 9, 2020

i did the above things and it worked for 1 field but copy failed for one field. I get the error as shown below What should i do? 

2020-07-09 09_28_21-Window.png

Bill Sheboy
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.
July 9, 2020

Hi @rupa_srivastava 

All of the fields may not be available for all of your issue types. 

  • If the fields should be available, use the admin functions to update and make them available on screens and contexts.
  • If they should not be available, you will need to structure the rule to handle each issue type separately.  For example:
If issuetype is Story, update relevant fields for Story

Else if issuetype is Task, update relevant fields for Task

Else if...

Else...
rupa_srivastava July 9, 2020

They are available and have the same screens and context as the other field (that worked).
The only difference between these two fields is that the failed field is a custom one .it displays an id when i select it while creating the rule.

Bill Sheboy
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.
July 9, 2020

That is interesting... When I use custom fields in smart value rule definition, I am able to use the human-readable name, rather than the custom field ID.

Here is an idea: for an example issue that would not update, use the REST API to grab all of the JSON and confirm the field ID and existence.  (This technique is also helpful when you do not know the name of the smart value which you want to update.)

Look here for how to do that:

https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/

0 votes
Answer accepted
Randy
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.
July 8, 2020

Likely because Bug, Story, Task, Type arent subtask issue types therefore do not have a parent issue.

 

Are you trying to copy the sprint from the epic?

rupa_srivastava July 8, 2020

Yes

Randy
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.
July 8, 2020

Instead of parent, select epic (parent).

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events