Hi, I've run the script, however I'm getting a ratelimited error. I've tried to adjust the API_DELAY_MS variable but it doesn't help. Does anybody have a workaround for this?
It's cool that there's a mechanism for this at all...has anyone turned this into an add-on yet? It would be infinitely cooler if we didn't need to execute some python ;)
@Daniel Eads Thank you for sharing this workaround, i am trying to apply it on my side and i think i am missing something that would be great if i can get your help with if possible.
when running the below command, i am getting this error...any idea what went wrong here or probably what have i missed?
@armcaelria Just for future reference for you or anyone else, you can iterate through a list of users and print them all using the join smart value function. For instance, making a list of all of the approvers for a card:
Everything inside of the quotes of join("") will be used between each entry. Since each mention must be formatted as @<userid> you have to end each with > and <@. Between those you can add any delimiter you want, in this case I used a comma. See here for more list manipulations available in smart values: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/
I'm getting the following error running the script. Can someone help?
ERROR:slack.web.base_client:Failed to send a request to Slack API server: IncompleteRead(42224 bytes read)
Traceback (most recent call last):
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/http/client.py", line 552, in _get_chunk_left
chunk_left = self._read_next_chunk_size()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/http/client.py", line 519, in _read_next_chunk_size
return int(line, 16)
ValueError: invalid literal for int() with base 16: b''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/http/client.py", line 569, in _readall_chunked
chunk_left = self._get_chunk_left()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/http/client.py", line 554, in _get_chunk_left
File "/Users/clariar/Library/Python/3.8/lib/python/site-packages/slack/web/base_client.py", line 495, in _perform_urllib_http_request
raise err
File "/Users/clariar/Library/Python/3.8/lib/python/site-packages/slack/web/base_client.py", line 479, in _perform_urllib_http_request
body: str = resp.read().decode(charset) # read the response body here
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/http/client.py", line 462, in read
return self._readall_chunked()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/http/client.py", line 576, in _readall_chunked
raise IncompleteRead(b''.join(value))
http.client.IncompleteRead: IncompleteRead(42224 bytes re
Hi @Daniel Eads really appreciate you creating this tool! I would love to give credit where it's due when using it, and I noticed that the license number in the .py file isn't really a license number. Where can I find the real one?
Hey, @Daniel Eads ... I have an odd scenario. I have followed the above instructions and everything seems to be working for nearlyeveryone... but not everyone. I have 1-2 people who apparently do not have Slack IDs; when automation attempts to send them messages, I get a 404 channel not found error. When I attempt to display their IDs, it's blank. This is what I have in the channel or user field:
@{{issue.assignee.properties.metadata.slack_id}}
Is there some way to inspect the Slack IDs via JQL or some other method? Alternatively, is there some way to inspect and update the Slack IDs?
Hello, @Daniel Eads I ran this using our Jira Sandbox as the Jira URL. The automation located all 589 Slack Members but returned the "No User Found for Email" error for every one of our users. I can visually verify that the emails addresses being located in Slack are identical to the email addresses in JIRA.
Would the fact that I ran this to the Sandbox cause any issue?
Hi @Daniel Eads , thank you for developing a great tool. I have a very sad report to make. This tool has stopped working in my environment since November. This tool worked great for a little over a year.
error message ------- slack.errors.SlackApiError: The request to the Slack API failed. The server responded with: {'ok': False, 'error': 'ratelimited'} ------------------------
I am happy, if this tool support Slack's rate limit.
NOPE! A way to complex to implement. Something simple i.e. only use @{{reporter.displayName}} without installing any code and tinkering with the settings????
Hi. I have this working for the most part, but 2 questions.
1. This is working for mentioning the Assignee on the ticket in the Slack channel "issue.assignee.properties.metadata.slack_id", but what is the format of mentioning the person or people in the "Requested Participants" field on the ticket? "issue.requested.participants.properties.metadata.slack_id"??
2. All my users from slack have sync'd with Jira users from the script. How do I mention a specific user in an automation? Not a user pulled from a certain field. For example @JaneDoe for every new ticket created.
As the field 'Requested Participants' is a list, you need to specify which member of this list you want to mention. If you intend to mention everyone who is listed in this field, you can iterate through the list using the code below, it will print out one mention per line.
You can't modify a user's properties unless you have the user as the assignee or in any field of the issue. However, if you want to go the extra mile and retrieve data from the user, you can overengineer it by making an HTTP request to pull the required information, but it is dull. Its easier the user configs his slack account to notify him everytime some keyword appears, like project key or something.
Appreciate you putting this together. I have completed all the steps and run the python script which seemed run without issue (~1590 users were updated)
Unfortunately I am still having issues with the ability to mention specific users.
I actually had this exact same issue for just a few users. Atlassian support was very helpful and was able to see that the user(s) in question all had something in common.
In my case, it was because the user(s) (with the issue) had duplicated accounts, both portal-only and atlassian accounts, and since there are 2 accounts with the same email it can confuse Jira and get the information from one of the accounts. The fix for that would be migrating the portal-only account and merging it to the user Atlassian account, you can do that by going to the https://admin.atlassian.com/, Jira Service Management - Portal Only Custimers - and searching for that user. Click on the three-dot icon had then on migrate it to Atlassian account.
After that, I believe that you will have to run the script again to resync the slack users with the Jira users.
100 comments