Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Is there an easy way to restrict domains for External Account creation?

Hello,

Through JSDCLOUD-868 we are now able to restrict domains to allow External Account creation, which is awesome.

However, I don't see any option to incude those domains in Bulks, either using an API or a more simple option, such as a CSV Import. We have thousands of domains to add to this field and we are trying to avoid manually including it, one by one.

The suggestion JSDCLOUD-11478 is related to this improvement, but I'm wondering if anyone in the Community found a workaround for it, such as a JS script or some kind of Macro that would allow us to perform the initial setup.

 

 

2 answers

1 accepted

I was able to accomplish that by using Python + Selenium, automating the user input.

First of all, I added all the 1k+ domains to a text file, without any formatting. Each line contained a domain.

Then, I ran the following code, reading all the domains and inserting into the input field on Jira:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from webdriver_manager.chrome import ChromeDriverManager


browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
browser.get("https://<JIRA_URL>/jira/settings/products/servicedesk/customer-access")

with open('/path/to/domain/file/domains.txt') as f:
lines = f.readlines()

for l in lines:
domain = l.strip()
inputField = browser.find_element(By.XPATH,"//input[@class='css-wxvfrp']")
inputField.send_keys(domain);
inputField.send_keys(Keys.SPACE);

The HTML Element referred in the XPATH is the input field in which we must enter each domain, separated by a SPACE key. The class of that input field is css-wxvfrp. On each iteration of the loop, we add a domain to the Input field and then press the "spacebar" to add that domain to the list.

I hope this can help anyone looking for a similar answer!

 

Useful links:

0 votes
Ward DIJKHUIS
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.
Aug 11, 2022 • edited

Hi Leonardo, I have struggled before with entering huge amounts of data into Jira, not as restricted domains but elsewhere. 

For these repetitive tasks I am using UiPath StudioX (https://www.uipath.com/product/studiox) to replicate the tasks you would normally do by hand. You can use any other RPA software such as Power Automate by Microsoft for this.

Hope this helps!

Hi Ward,

Thanks for your answer!

I tried to explore the UiPath StudioX tool, but unfortunately, they didn't have a version for Mac OSX. I moved to Selenium using Python, that proved to be very efficient. I'll publish the code in case someone is interested.

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