How to setup a rule to archive the rule when the status transition to DONE?

Michelle Kha February 29, 2024

Hi, I used a rule template to setup a rule to archive the idea when it transitioned to DONE status.  The rule requires that I set an issue action.  However, there is only an option to delete the idea which is not what I want.  There is no option to archive the idea. 

I also tried to select the field "Idea Archived On" and set the smart value {{now}} to it but the rule failed and I have attached the error message.

Capture.PNG

Please help.

3 answers

2 accepted

Suggest an answer

Log in or Sign up to answer
3 votes
Answer accepted
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 29, 2024

Hi @Michelle Kha ,

It sounds like you might be trying to use the existing archive template, but if that's not the case and you are unaware - there is an already existing template within each JPD project to easily configure an automation that archives an idea when it's transitioned to a Done status:

archive1.jpgarchive2.jpg

 

The error you shared seems like the automation is trying to edit some other fields besides archiving the idea. I could be wrong, but it's a strange error.

 

There is also the option to configure this within the Project settings >> Workflow tab of a JPD project. You'd want to select the transition of the Done status and add a rule:

 

archive3.jpg

 

The rule would look something like the one below to archive the idea when they are transition to Done:

archive4.jpg

 

That error you shared could also be related to the Automation for Jira user not having JPD permissions. We've recently notice some customers seeing strange errors like yours, so the A4J user would need JPD permission granted in order to execute the automations for JPD.

Unfortunately this is not something that can be configured within the admin hub, but JPD support can assist with enabling this if you open a ticket with them.

Michelle Kha February 29, 2024

Thank you so much for your response.  I did exactly the same as you suggested but the rule keeps failing.  It won't set the value to the field "Idea Archived" and complaining that this field doesn't exist.  Although this template said transition idea to archive, there is no action to actually move the idea to the Archive folder.  What you illustrated here is simple updating the fields "Idea Archived" and "Idea Archived On".

Thanks again.

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.
February 29, 2024

Hi @Michelle Kha -- Welcome to the Atlassian Community!

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

When I checked, there appear to be three fields set when an idea is archived.  In my Jira site they were:

  • "Idea archived by" -- this has a user structure, and is probably set using the accountId attribute
  • "Idea archived on" -- this appears to be in the jiraDateTime format
  • "Idea archived" -- this has a value attribute, apparently set to "Yes" for archived issues

It is unclear if any other fields were set by archiving, as we are straying into undocumented areas of JPD.  Perhaps try setting all three with your JSON in the rule.

 

If that does not work, a work-around I used for this scenario with another team was to add a custom field to show / not show an idea, and toggle that when transitioned to Done using a rule.  Then we updated the view filters to hide them based on the custom field.

Kind regards,
Bill

Michelle Kha February 29, 2024

Thank you for your suggestion.  I think I will probably have to use the last suggestion to show/not show the idea.

 

Thanks again.

0 votes
Mari-Ann Eriksen March 1, 2024

Got similar message when setting up same automation. What I needed to do, was to go into the rule details and change the actor from "Automation for Jira" to my user. Maybe a bug with that user in JDP?

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 1, 2024

Hi @Mari-Ann Eriksen ,

As mentioned above, that is related to your A4J (Automation for Jira) user not having the correct permissions to preform rules within JPD. Not entirely sure it's a bug, but we're aware this has been happening with customers lately.

If you open a ticket with JPD support - they can assist with granting the A4J user with the correct permissions.

TAGS
AUG Leaders

Atlassian Community Events