When the sub task is resolved, the user's comments are stored in the Comment section of sub task. I want to copy these comments to the parent issue's comment section.
Is there any available plugin to achieve this?
Or a script has to be coded? If yes then, where exactly the script has to be called?
Hi Pranita
This is straight forward with Automation by Jira. You can create an automation rule that is triggered either on comment of the subtask or on transition of the subtask. The first way will copy each comment as soon as possible and it even as a beginner with no experience you will get this running in the first try. The second script where you have to wait until the subtask is done before a bulk copy is executed is bit more tricky. But I think it is feasible with a reasonable amount of work.
here the first rule
- on comment of an issue
- if issuetype is subtask
- Iterate over linked issues “parent”
- comment on issue {{triggerissue.comments.last.body}}
here the second approach (I am not sure if it will run that way)
- on transition to done
- if issuetype is subtask
- iterate over linked issues “parent”
- comment issue {{triggerissue.comments}}
The very last step might not work. I dot not try.
good luck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With JSU it is possible to copy the transition comment or the last comment, so the comment that is entered during the Resolve transition can be copied to the parent.
If every comment needs to be copied this can only be achieved by using a transition to comment, instead of commenting directly on the issue.
Best,
Maria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great @Pranita Warik! Glad to know I could help!
Should you need further support, please reach out to our Service Desk.
Best,
Maria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Florian ,
I am able to get the trigger to work. But parent story shows that the comment was made by the Actor which defaults to the user who created the trigger. I am not able to set the Actor to 'assignee' or user who added the comment when I create the trigger.
Do you have a suggestion for this?
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Pranita Warik ,
you can do that via plugin and also via script. I think the Automation for Jira would be the most suitable plugin to use for this.
Please check out this thread to find out more, you can also see the script examples in there:
In case of any questions, let me know!
Adam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had tried the code (Answer Accepted) in the link shared by you. But it comments were not copied. I have called the script on the post function when the sub task is getting resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Pranita Warik ,
I am late - sorry, but glad you have found the answer in the meantime. In case you need more help, let us know.
Adam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Florian Thank you for that information. Out of curiosity, what automation steps are implied with "iterate over?"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
with „iterate“ I mean a loop that allows you to handle one task after another. Some programming languages have something like „foreach“ as an iteratir statement. In Automation For Jira this can be achieved with the purple action. I think it named „branch“.
Automation for Jira has four categories of „LEGO bricks“ that build you script.
- Triggers (green) initiate a script on an event or timer based rule.
- Conditions (orange) allow you to decide what you want to do on under certain circumstances.
- Actions (blue) is the actual automation step. Like modify a value.
- Branch (purple) triggers sub processes for other issues that relate to your rule in some way (subtask, linked issues, whatever).
I hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.