Tuesday, September 30, 2014

Changelog for 9/30/2014

Day based Payout Multipliers

Multipliers for gold and shares based on the number of days a person has in the payout period has been added.

Effectively, this is just a shorthand way to accomplish scaling pay based on days as opposed to using the minimum and maximum options for the individual code type payouts, which could get quite complicated. On the other hand, this approach is more limited as it is global to the payout and cannot be limited to individual code types.

This can be found under the "Day Settings" section.

Replay Player Details

While the system has been loading most of the player's details (the noticeable omissions were damage past 300 meters and damage blocked by armor), most of this hasn't been viewable. This has been fixed; clicking anywhere that isn't a link on the replay's player list will show detailed information about that player.

Other Changes

  • Made some Breadcrumbs "smarter" by linking back to Battles or Matches from the replay view to the date the replay was for.
  • Removed the banner about the inability to load tank in garage data accurately, replaced with a more friendly link explaining the problem and potential solutions.
  • Changed some sections in the Code Type creation/editor pages to expanders, instead of sections with just advanced or hidden content which saves space. This will likely be expanded to other pages that need it (if there are any, I haven't checked).
  • Improved date range filtering for searching Payouts to act in a logically.
  • Fixed Payout Stats Gold Cost by Type taking into account negative values when determining result.
  • Added Gold Savings by Type chart to display information about what is "saving" the most gold by giving negative gold.
  • Changed replay paths to fit with other paths better.

Fixes

  • Inability to set default payout automatically loading code type payouts from it via the clan editing page.
  • Payout Details view sort defaulting to case insensitive sorting by name.
  • New port map missing a friendly name.

Saturday, September 27, 2014

Tutorial for the Matches System

With the Clan Wars tournament coming up, I had figured a tutorial covering the matches system would be useful.

This ended up taking a bit longer than I would have liked to finish and I'm not sure I like the format.

Specifically, I'm worried that I'm cutting out too much which is making it harder to follow what I'm doing, yet at the same time, it seems like past the introductory videos showing going to the Clan Home, then clicking the link to whatever page I'm going to, and then clicking New on that page is just making the video unnecessarily long. Feedback regarding this, or anything else, is always appreciated.

Also, if you haven't already, you may find it useful to watch the getting started video series, especially part 1:

Thursday, September 25, 2014

Changelog for 9/25/2014

Improved Payout Templates

I noticed there was a gap in the capabilities of the payout system; there wasn't really "good" support for having several different payout templates that could be chosen at will, and there was absolutely no support for multiple Code Type Payout setups being saved. To help remedy this situation two new features have been added.

Firstly, in addition to the existing option of setting a default template payout, any payout can now be used as a one-time template for a new payout via the "Actions > Use as template" link next to each payout on the Payouts page.

Second, code type payouts can now optionally be loaded from the template being used. This option can be set for the default template in addition to being selectable when using any payout as a one-time template.

Other Changes

  • Various improvements to the Clan Wars Map Provinces viewer.
  • Collapse clan-related settings on user's settings page if they aren't in a clan.
  • Added info bar for new payouts indicating which template is being used, if any.

Fixes

  • An issue which would cause user's clan settings not to be created under certain conditions, thus causing payout calculation to fail.
  • Payout templates not setting "Ignore Match Reward Rules" setting.
  • Trying to sort by role on the Attendance home causing an internal server error.

Tuesday, September 23, 2014

Changelog for 9/23/2014

Support for New Roles

The new roles have been added to Clan Tools and work just like existing roles. To enable this the corresponding groups for the new roles have also been created and automatically linked. The existing groups have also been renamed to correctly match with the new names, though feel free to change them back if you don't like the new names.

The new group's default permissions are as follows, though these can be changed via the groups page:

  • Personnel Officer: Similar to the executive officer without most attendance and payout related permissions, or permissions that generally allow indirect code creation.
  • Junior Officer: Same as private to match WG's approach.
  • Reservist: Same as recruit as recruit already has no permissions by default.

Also, if you had a group with the same name as one of the new roles, that group has been renamed to prevent conflicts.

Moved Payout Bonus Codes

Like Replay Reward Rules, the Payout Bonus Codes (now Group Bonuses) selector was somewhat poorly placed and as such made it hard to get a full understanding of what the Code Type Payouts for a Code Type would be giving out. So now the groups which a code type's code type payouts apply to as a bonus is set via the Code Type's editing page.

With this change I believe all assignment of Code Type Payouts is done via each Code Type's edit page which should hopefully help keeping track of all of these things easier.

Monday, September 22, 2014

Changelog for 9/22/2014

Matches "Add Replays" link Removed

The difference between adding replays and New isn't very clear--adding a replay to an existing match uses the existing code, if any, rather than creating a new one--and whatever benefit there is to have the Add Replays link is outweighed in my opinion by the confusion it introduces.

This functionality still exists, as it does already, via the "Add Replay" link under the actions dropdown next to matches. Additionally, I've added an "Add Replay to Match" link under the actions menu to hopefully clarify that the functionality is there, as on the battles action menu the add replay only allows adding replays from that battle.

Codes

The underlying way in which the system managed the keys for codes was deeply flawed and had major scalability issues. As such, I've changed over to a much more logical approach.

On the surface there should be no noticeable differences aside from now the prefix is considered to be a part of the key, and will no longer change when a code type's prefix is changed. I doubt this will be an issue though. In theory there should also be a performance increase when entering codes as the previous method for finding what key a code when with was incredibly convoluted.

Clan Specific User Settings

Previously, the user related settings clan administrators could edit were, sans the groups, not actually clan specific. If a user moved from one clan within clan tools to another, the settings set by the previous clan, including no pay and debit would remain. This is obviously far from ideal.

To fix this, I've moved where those settings are stored around and now each user has some settings stored that are specific to their current clan. As a bonus, the system still remembers these settings when a member leaves then comes back.

Group Permission Changes

For existing clans the permission to edit a clan member's inactivity has been split from the ability to edit a member's no pay and debit settings as those are two vastly different things from my point of view. You'll need to grant the ability to manage a user's inactivity records to whichever groups you wish to have that permission.

For new clans the default permissions for several roles has been changed. Perhaps most notably is that DC's are no longer given any Group related permissions anymore and field commanders are allowed to upload replays to matches.

Additionally, as most know I'm sure, WG is going to introduce new clan roles. I've created some code for automatically adding groups and links for these new roles into Clan Tools in a logical way. I hope to perform this migration action before it's an issue, which I believe will be possible due to the RU server generally being updated first (I need to know the internal names WG gave the new permissions). Also, I've assumed that WG is going to only being changing the names that are displayed for the existing roles; if they also change the internal reference names I'll have a deal more work to do.

As for the new roles, the default permissions on Clan Tools will be:

Personnel Officer: Similar to the executive officer without most attendance and payout related permissions, or permissions that generally allow indirect code creation. So, an executive officer can view codes, however they cannot create new ones nor enter codes beyond their valid for time.

Though it is worth noting that they have the ability to upload replays and perform match related actions, including creating a match--thus depending upon how the match types are set up, by default, a personnel officer could still create codes arbitrarly.

Junior Officer: Same as soldier to match WG's approach.

Reservist: Same as recruit as recruit already has no permissions assigned by default. It is worth noting a few permissions are implied to clan members, such as the ability to view clan articles and announcements.

Templates

The template system is now on the site, though existing clans can't really use it (I took the "easy" route and avoided a lot of potential problems by simply preventing its use if a clan already has one or more code types).

Framework Update

I've also updated the framework Clan Tools uses, this, like the changes to codes, shouldn't be noticeable on the surface, it was however beneficial due to the security fixes. Unfortunately, due to differences between the framework versions I had to make various changes throughout the code to make everything work again. Everything is working as expected the best I can tell, but none the less this is a significant change so there may be some issues I didn't find.

Other Changes

  • Added a warning message to the Group's page. I'm a bit torn as I don't want to scare clan leadership from using the power of the Groups system, but on the other hand the Groups system is perhaps the most powerful, and thus dangerous, system that's accessible via the site so it seems that there should be some sort of warning--I don't want it to be said I didn't give a warning.
  • Removed MyWotStats link from clan applications as apparently that site closed down.
  • Added a help page (link) though I think I'll wait till there's a few more videos to show on there before I publicize it more.
  • Stopped loading user's account stats when doing a quick refresh a clan's members (they aren't even visible anywhere on the site, which is a different issue, but none the less).
  • Auto-generation code updated to use regional time zones. This doesn't really matter at present as all of the clans are currently in the NA region, but it is a step towards making everything work as expected if clans from other servers end up using Clan Tools.

Fixes

  • "Newest Tweet by" changed from ClanTools.us to Clan Tools to reflect that I changed the twitter account's name.
  • Empty [] showing up next to players in Replays who were clanless.
  • Payout calculator not reporting credit owed when the treasury doesn't have enough gold to cover static gold payments.
  • No longer show "non participating" clans.
  • Numerous pages with a search not resetting current page when searching, thus causing confusing results as no results are shown due to the page being too far advanced for the more limited search terms.
  • Fixed an issue in the Match auto-create code that prevented it from working.
  • Fame being updated despite regions being marked as disabled.

My current focus is now to get a few more tutorial videos created and support for other servers fully working.

Thursday, September 18, 2014

Changelog for 9/18/2014

Replay Reward Rules Management Moved

The Match Reward Rules and Clan Battle Reward Rules--collectively Replay Reward Rules now--weren't managed from the most logical of places. Match Reward Rules were managed by editing the match types they were linked to and Clan Battle Reward Rules were just under the Battles section of the Edit Clan page. To (hopefully) correct this, both are now managed from the editing page of the code type the rules are tied to. This results in it being much easier to get an overview of what the Code Type's Payout(s) will apply to.

It's worth noting that this change has shifted under what permissions the Replay Reward Rules are manageable under from their respective pages to the Code Type edit page. I however do not view this as a problem because the permissions which restricted their editing were just as illogical as the pages from which they were edited.

More Reserve Options

One requested feature for the payout system to support reserve growth. So, for example, one could set the reserve growth to some percent (say 10%), and the system will select what it believes is the most recent previous payout (though its choice can be overridden, if desired) and then it will perform the following maths to determine the gold value of the reserve for the current payout: Given Gain Percent of (Treasury - Previous Reserve) + Previous Reserve

The previous setting of the reserve value being just a gold amount to subtract is still present (and the default), as well as a plain percent of the current treasury, and growth in terms of a flat gold rate, rather than a percent value.

These options can be accessed under the first advanced settings section of the Payout creation/editing page.

Other Changes

  • Moved "Generate Unsubmittable Codes" and "Is Deprecated" to an advanced settings group in the Match Type creation/editing pages.
  • Added a warning to the Clan Role Settings section as, in most cases, editing those settings is both unnecessary and potentially dangerous as changing them allows for the granting of permissions.
  • Added a "Notes" field to the Battle's editing page. In the future I hope to create a more robust commenting system; for the moment though, this will hopefully be acceptable. Battles with notes will have a paperclip icon displayed next to the "Actions" dropdown, with the notes being displayed as a tooltip upon hovering. As in aside, adding a notes field to the replay's detail view is (significantly) more difficult and as such will have to wait for the time being.
  • Added better error message for rare "race conditions".
  • Improved display of listings of Payouts from three dates to a readable string.
  • Added a link to clan's World of Tanks page on the Payout Record page.

Fixes

  • Selecting all replay types via "Select All" causing the match type to fail to save.
  • Frozen clan wars map being shown as "freezed" instead of "Frozen".
  • Incorrect legend entry on code type's creation/editing page.
  • Payout Template not setting Payout Category ID

As to the future, I plan on recording part two of the getting started video today, so I expect the initial setup pages to be live in the next few days.

Tuesday, September 16, 2014

Improving the Setup Process

On of the major weaknesses of Clan Tools has always been the setup process. This has only increased as more features were added as it means there's even more being presented to a new user all at once. One promising suggestion was to have templates to provide a starting point from which to build on. Work on this is almost complete. However, I don't think a template system alone is the solution. The old adage about giving someone a fish vs. teaching them how to fish comes to mind; the template gives them a fish--which has its uses in the short term--however, what I really want is to teach the user how to fish.

With this goal, I've decided to attempt to make tutorial in video form. The below is the draft for the first video.

I would appreciate any feedback or suggestions you might have, be it with regards to the video or the general setup process itself.

Friday, September 12, 2014

Changelog for 9/12/2014

Minor Changes

  • Reordered Navigation items on the Clan Home page to have more logical groupings.
  • Removed the ability to disallow players with tags from submitting applications. See note 1 below for more information.
  • Delayed updating of player's data on login. See note 2 below for more information.

Fixes

  • Logs permissions policy incorrectly reporting a user having permissions in some cases.
  • Theoretical vulnerabilities in a few policies under certain conditions.
  • Logs page missing breadcrumb.
  • "Apply to clan" link still appearing if you're already a member of the clan.
  • Clan player refreshing failing if it tried to process an account that WG's API claimed didn't exist.
  • Sight inefficiencies related to users who aren't logged in.
  • Fixed requesting non-existing files of content types other than html or js causing a 500 response instead of a correct 404 response.
  • Fame pages displaying incorrect URL's after searching.
  • Clan Wars provinces page search not working.
Notes
  1. In order to effectively disallow players with clan tags from applying, the system has to actually contact the WG API and see if they are in a clan. This isn't always reliable or quick, and all the while the user is sitting at a white loading screen. Now, there are ways to make this more seamless, but such methods take time to implement and I honestly believe there are more pressing things for me to focus on. As such, I've disabled the feature.
  2. Similar to the problem noted in note 1, updating the player's WoT account data on login caused unnecessary delays and could possibly even fail preventing logging in all together. Now, the downside to this approach is that for time after logging in, all of the WoT account data won't be available to the system. This isn't really a big problem though as the only data that will matter in most cases is the clan data, and that will already be loaded in most cases automatically for participating clans.

Monday, September 8, 2014

Changelog for 9/8/2014

As a note: From now on I'm going to be posting changelogs here from now, rather than on the main site.

Personal URL Changes

Previously there were several pages which only the account owner could access, however they still pulled the user information from the URL and relied on security policies to limit access correctly. Now they simply use whoever the current user is; this change both increases security and is more logical.

For example what used to be https://clantools.us/users/account-id/settings is now https://clantools.us/account/settings

Email Field Removal

For the time being I've removed the ability to enter an email address. I'm working towards getting traditional email validation (as in the site sends you an email with a confirmation key) instead what it was before, a text field that wasn't used for anything. However, that has been placed on the back burner while I work on more pressing tasks. None the less, there's no need for the field to be there for the time being.

Clan Wars Server Landing Page

Previously there was no way to actually select to view a server's clan wars maps or the fame rankings. The system used assumptions to determine which page to send the user to after picking a server. It still does this if the information is present, though now if it's not it directs to a section page rather than just defaulting to the maps page.

Going forward, my primary focus is going to be making the initial setup process easier and improving some latency issues caused by waiting for the WG API to reply.