Revert show-all default behavior

This reverts the change to show all fields in the create mode to behave
like before in all tests.

If we want to change it, we should move it out of this PR.
pull/4471/head
Oliver Günther 8 years ago
parent 83760a4c54
commit 49f5a836e8
  1. 4
      frontend/app/components/work-packages/wp-single-view/single-view-wp.service.ts
  2. 1
      frontend/app/components/work-packages/wp-single-view/wp-single-view.directive.ts
  3. 6
      spec/features/work_packages/new_work_package_spec.rb

@ -49,8 +49,8 @@ export class SingleViewWorkPackage {
var visible = attrVisibility === 'visible';
var hidden = attrVisibility === 'hidden';
if (this.workPackage.isNew === true) {
return notRequired || hidden;
if (this.workPackage.isNew) {
return field === 'author' || notRequired || hidden;
}
return notRequired && !visible && (empty || hidden);

@ -105,7 +105,6 @@ export class WorkPackageSingleViewController {
private init(wp) {
this.workPackage = wp;
this.singleViewWp = new this.SingleViewWorkPackage(wp);
this.hideEmptyFields = !wp.isNew;
this.workPackage.schema.$load().then(schema => {
this.setFocus();

@ -66,6 +66,12 @@ describe 'new work package', js: true do
wp_page.subject_field.set(subject)
save_work_package!
# safegurards
wp_page.dismiss_notification!
wp_page.expect_no_notification(
message: 'Successful creation. Click here to open this work package in fullscreen view.'
)
subject_field.expect_state_text(subject)
create_work_package('Bug')

Loading…
Cancel
Save