issue_filter.shared_with_all_users=Shared with all users
issue_filter.sharing=Sharing
issue_filter.manage.shared_filters=Shared Filters
+issue_filter.bulk_change=Bulk change
#------------------------------------------------------------------------------
#
/**
* Execute a bulk change
*/
- public Result<List<Issue>> executebulkChange(Map<String, Object> props) {
+ public Result<List<Issue>> executeBulkChange(Map<String, Object> props) {
Result<List<Issue>> result = Result.of();
try {
IssueBulkChangeQuery issueBulkChangeQuery = toIssueBulkChangeQuery(props);
end
end
+ # GET /issues/bulk_change_form?[&criteria]
+ def bulk_change_form
+
+ render :partial => 'issues/bulk_change_form'
+ end
+
private
--- /dev/null
+<form id="bulk-change-form" method="post" action="<%= ApplicationController.root_context -%>/issues/bulk_change">
+ <input type="hidden" name="data" value="<%= params[:data] || u(@filter_query_serialized) -%>">
+ <fieldset>
+ <div class="modal-head">
+ <h2><%= message('issue_filter.bulk_change') -%></h2>
+ </div>
+ <div class="modal-foot">
+ <input type="submit" value="<%= message('submit') -%>" id="bulk-change-submit"/>
+ <a href="#" onclick="return closeModalWindow()" id="bulk-change-cancel"><%= message('cancel') -%></a>
+ </div>
+ </fieldset>
+</form>
+<script>
+ $j("#bulk-change-form").modalForm({success:function (data) {
+ window.location = baseUrl + '/issues/filter/' + data;
+ }});
+</script>
\ No newline at end of file
<a id="save-as" href="<%= url_for params.merge({:action => 'save_as_form'}) -%>" class="link-action open-modal"><%= message('save_as') -%></a>
</li>
<% end %>
+ <!--<li>-->
+ <!--<a id="bulk-change" href="<%= url_for params.merge({:action => 'bulk_change_form'}) -%>" class="link-action open-modal"><%= message('bulk_change') -%></a>-->
+ <!--</li>-->
</ul>
<div class="page_title" id="filter-title">
@Test
public void should_execute_bulk_change() {
- service.executebulkChange(Maps.<String, Object>newHashMap());
+ service.executeBulkChange(Maps.<String, Object>newHashMap());
verify(issueBulkChangeService).execute(any(IssueBulkChangeQuery.class), any(UserSession.class));
}
public void should_no_execute_bulk_change_if_unexpected_error() {
doThrow(new RuntimeException("Error")).when(issueBulkChangeService).execute(any(IssueBulkChangeQuery.class), any(UserSession.class));
- Result result = service.executebulkChange(Maps.<String, Object>newHashMap());
+ Result result = service.executeBulkChange(Maps.<String, Object>newHashMap());
assertThat(result.ok()).isFalse();
assertThat(((Result.Message) result.errors().get(0)).text()).contains("Error");
}