Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

get changesets #2962

gmming ·
i have QB hooked up with jira. in one of the build steps, i need to access the jira tickets associated with the current build so that i can transition these tickets. what is the simplest way to do this?
  • replies 5
  • views 2598
  • stars 0
robinshen ADMIN ·
QB itself has update jira issues step which can update status of jira issues detected from commit message. If you'd like to do it your own way, please use below script to iterate over all changes of current build:
groovy:
for (change in repositories.get("some repo").changes) {
// access various field of change object to find things to process, change object is of class "com.pmease.quickbuild.repositorysupport.Changeset". Refer to QB javadoc or inline scripting help for details.
}
gmming ·
When I use the update jira issue feature, I noticed it will output jira/unprocessed_commands if transitions don't complete successfully. I would like to notify people when this occurs. how do i go about doing this? thanks.
gmming ·
also, is it possible to transition only some of the tickets based on a query? for example, the build consists of 3 jira tickets TEST-1, TEST-2, and TEST-3. TEST-1 and TEST-2 have fixVersion of 9-15-2015 while TEST-3 doesn't. I would like to transition only TEST-1 and TEST-2. How can i achieve this? thanks. -M.
steveluo ADMIN ·
When I use the update jira issue feature, I noticed it will output jira/unprocessed_commands if transitions don't complete successfully. I would like to notify people when this occurs. how do i go about doing this? thanks.


Yes, you can use some script in Update Issue Step -> Show Advanced -> Post-Execute Action -> Execute a script like below:

${groovy:
import com.pmease.quickbuild.util.MiscUtils;
import com.pmease.quickbuild.entitymanager.SettingManager;

if (!step.getFailedReport().isEmpty())
MiscUtils.sendMail(
"tolist@example.com", // to list
"cclist@example.com", // cc list
"Email Title", // email title
"Email body", // email body
null, // email attachment
SettingManager.instance.getEmailSetting(),
"text/html");
}
steveluo ADMIN ·
also, is it possible to transition only some of the tickets based on a query? for example, the build consists of 3 jira tickets TEST-1, TEST-2, and TEST-3. TEST-1 and TEST-2 have fixVersion of 9-15-2015 while TEST-3 doesn't. I would like to transition only TEST-1 and TEST-2. How can i achieve this? thanks. -M.


No. I have filed an improvement below and will get it fixed in next patch release:
http://track.pmease.com/browse/QB-2179