Does anyone have an easy way to assign all issues to an organization? The new feature is great but none of the existing tickets are visible to the organization because they do not have the organization set. Bulk Edit does not seem to have a way to update the organization. Any ideas on how to do this programmatically or via bulk edit?
What I ended up doing is to use Selenium to script opening each issue and assigning an organization. I used JQL (issue search) to list all of the tickets, copied the issue ID's, made that an array in a selenium script, and ran it on the array. The script was not very good, I'm sure if I had more than a hundred I would have worked harder to make it better, but this worked well enough, took a while to do them one at a time but it was just a hack,
Replace MyCompany (part of your Atlassian url), MyOrganization (name of the organization you want to set), and MyDeskID (the issue prefix for service desk) and of course the array of issue ID's...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="https://mycompany.atlassian.net/" />
<title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">New Test</td></tr>
</thead><tbody>
<tr>
<td>storeEval</td>
<td>myArray = new Array('52', '51', '50', '48', '47', '46', '45', '44', '43', '42', '41', '40', '39', '38', '37', '36', '35', '34', '33', '32', '31', '30', '29', '28', '27', '26', '25', '24', '23', '22', '21', '20', '19', '18', '17', '16', '15', '14', '13', '12', '11', '10', '9', '4');</td>
<td>myArray</td>
</tr>
<tr>
<td>storeEval</td>
<td>0</td>
<td>index</td>
</tr>
<tr>
<td>while</td>
<td>index < storedVars['myArray'].length;</td>
<td></td>
</tr>
<tr>
<td>store</td>
<td>javascript{storedVars['myArray'][storedVars['index']]}</td>
<td>issueid</td>
</tr>
<tr>
<td>echo</td>
<td>javascript{storedVars['issueid']}</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>"https://mycompany.atlassian.net/browse/MYDESKID-"+storedVars['issueid']</td>
<td>myURL</td>
</tr>
<tr>
<td>echo</td>
<td>javascript{storedVars['myURL']}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>javascript{storedVars['myURL']}</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>css=span.trigger-label</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>2000</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=customfield_13300-textarea</td>
<td></td>
</tr>
<tr>
<td>sendKeys</td>
<td>id=customfield_13300-textarea</td>
<td>MyOrganization</td>
</tr>
<tr>
<td>pause</td>
<td>1000</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>link=MyOrganization</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=edit-issue-submit</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>javascript{storedVars['index']}</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars['index'] + 1;</td>
<td>index</td>
</tr>
<tr>
<td>echo</td>
<td>javascript{storedVars['index']}</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>2000</td>
<td></td>
</tr>
<tr>
<td>endWhile</td>
<td></td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
Ok, it's not as simple as Bulk Edit (so please Atlassian add Organizations as a Bulk Edit option!!) but I have managed to update all issues using the CSV import guide here
Bear in mind though, when you are adding Organizations to the CVS file:
HTH,
Rob
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.