Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Autommatic tagging

Martin Molt February 14, 2023

Hi everyone, 

I want to tag a request with multiple tags depending on the organization, related to the request. I did manage to get it working by creating an automation, which adds the needed tags on fieldchange of organization. 

My problem is: I need to do this for about 800 organizations, each needing 1-4 tags. 

That would be a lot of work to do in the automaiton editor, hence the question if it is possible to edit an automation in textform or does one of you have another idea on how to accomplish the automated tagging? 

Thanks!

 

 

 

2 answers

1 accepted

1 vote
Answer accepted
Martin Molt February 20, 2023

I ended up doing it by hand, as I have to do it only once anyway. 

0 votes
Simon König
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 14, 2023

Hi and welcome!

 

Do you want to give the tags based on what kind of organization you have in your current Issues or do you just want 800 Issues to get the same 4 tags?

Maybe it is possible to change the trigger of your rule to something you can change via Bulk-Change e.g.: Set a rule to trigger upon changing a field value to 1 -> Set tags depending on the organization in "customfield_id" -> trigger rule via Bulk Change of all Issues.

Martin Molt February 14, 2023

Hi Simon, thanks!

I want to give the tags based on selected the organization.

I'm not sure on what you mean by the bulk change.
Currently its the following:

  1. Field value has been changed for field 'organizations'
  2. If field 'organizations' equals 'ORG_XYZ'
  3. Then change tags to 'XYZ', 'ABC' etc.
Simon König
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 14, 2023

OK,

my idea was to set up a rule like this:

If "customfield" changes to 1:

Branch 1:

if field 'organization' is X, then change tags to: xxx

Branch 2:

if field 'organization' is Y, then change to: yyy

Now trigger this rule on all 800 issues via 'Bulk Change':
-Navigate to your Issues that need changing, select them in the top right corner to BulkChange and change the customfield value from None to 1 on all of them, triggering the rule.

 

This is a workaround I would use. I don't know if there is a possibility to Change Tags directly via BulkChange or some other Automation Rule you could use.

Martin Molt February 14, 2023

I think you missunderstood me there.
I have a few hundred organizations, not issues.

And my problem is the massive amount on setting up each elseif in the automation editor. 

Simon König
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 14, 2023

Ah, yes I misunderstood, sorry.

I think this is not possible, since you would have to define the logic from "organization" to "tags" somewhere. You could try to iterate over your different organizations (see here https://community.atlassian.com/t5/Automation-questions/How-to-iterate-over-a-created-variable/qaq-p/2069507) but even then you would have to describe which tags to set for each "organization".

Even if you would run a script you would have to define this somewhere.

Martin Molt February 14, 2023

Yes, I am well aware that I need to assign the tags to the organizations in some way.
But the UI in the automation editor is not really helpful when I have to create an elseif branch for every organization by hand. Ideally I would like to copy/paste the elseif and the then part and just edit the tags/organization in plain text. 

Exporting and importing the automation seems to only work when not changing the content, as the fields have unique ids...

Simon König
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 14, 2023

The one thing you could try is to use the "Advanced Settings" on your rule to iterate (see above) over you custom field and try to set the labels there.

If that is not working you have to get an Addon that lets you run scripts like Scriptrunner. Unfortunately I don't know any way to use plaintext or scripts in automation.

Martin Molt February 16, 2023

I changed my approach. My new situation is the following:

 

I have a few hundered organizations. Each organization ends with a number. 
E.g. ABC40, DEF40, GHI20 and so on. 

Now I want to add organization ABC40 and DEF40 automatically when the organization MAIN40 is selected. Is there any way to do this via JQL or something similar? So I dont need to add the orgs manually, but filter for %40 for example.

Cheers!

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