Skip to content

Allow the Current Ruleset to be changed#367

Merged
brian-brazil merged 4 commits intorollerderby:devfrom
frank-weinberg:feature/change-current-ruleset
Oct 18, 2019
Merged

Allow the Current Ruleset to be changed#367
brian-brazil merged 4 commits intorollerderby:devfrom
frank-weinberg:feature/change-current-ruleset

Conversation

@frank-weinberg
Copy link
Copy Markdown
Contributor

This allows e.g. changing intermission duration or en/disabling auto start/stop rules without a reset of the teams.

return getMaximumTime() - getTime();
}
if (prop == Value.MAXIMUM_TIME && getId() == ID_INTERMISSION) {
long duration = DEFAULT_MAXIMUM_TIME;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means I can no longer override the maximum time for an intermissions from the operator screen, which is often required when the schedule needs moving forward.

@brian-brazil
Copy link
Copy Markdown
Contributor

That updating/deleting rulesets that are in use will affect the in-progress game may not be completely obvious to users.

@frank-weinberg
Copy link
Copy Markdown
Contributor Author

I have removed the delete button (because it's completely unclear what should be done if the active ruleset is deleted) and added a note that editing will affect the current game for rulesets currently in effect.
(I've also changed handling of max intermission time so manual overrides are possible again.)

@brian-brazil
Copy link
Copy Markdown
Contributor

That works.

A few small issues:

  • Changing the current ruleset dosen't update the Delete button/warning
  • If you create a ruleset that's only whitespace, things get odd
  • The Name of "WFTDA Sanctioned" shouldn't be in a textbox, as it's not editable

I suspect the last two are existing.

@frank-weinberg
Copy link
Copy Markdown
Contributor Author

They were existing but sufficiently easy fixes/workarounds.

Copy link
Copy Markdown
Contributor

@brian-brazil brian-brazil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grand, saves me from fixing them.

Comment thread html/components/rulesets-tab.js Outdated
WS.Set("ScoreBoard.Rulesets.Ruleset(" + activeRuleset.Id + ").Rule(" + val.Fullname + ")", value);
});
var newName = tab.find("#name").val();
if (newName.trim() === '') { newName = 'Unnamed'; }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elsewhere (colors) we ignore such requests, I think we should do the same here.

Comment thread html/components/rulesets-tab.js Outdated
});

if (rs.Immutable) {
tab.find("#name").attr('readonly', true);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think disabled would be a bit clearer

@frank-weinberg
Copy link
Copy Markdown
Contributor Author

Addressed the last comments and fixed an NPE discovered in the process.

@brian-brazil brian-brazil merged commit 39fa469 into rollerderby:dev Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants