Skip to content

Instantly share code, notes, and snippets.

@sheac
Last active May 8, 2018 21:26
Show Gist options
  • Select an option

  • Save sheac/c8231cd943b58c84b1cc702c6ddc4973 to your computer and use it in GitHub Desktop.

Select an option

Save sheac/c8231cd943b58c84b1cc702c6ddc4973 to your computer and use it in GitHub Desktop.
Some demos for affected-fields ticket Dev Acceptance

Jira Tasks

Related to Roles and Permissions:

Related to Templates and References:

General Idea

Currently, when Beacon tells clients of a Job change, the clients update the entire job. This is thought to be inefficient.

The new strategy is for Beacon to tell clients which fields on the job should be updated.

What Needs Confirming

The new strategy has been confirmed for most JobSelectOpts fields that we expect to change. There are six where we still need to Dev-Accept:

  1. Permissions
  2. Roles
  3. Templates
  4. SnapshottedDataSheetValues
  5. PlannedDataSheetIds
  6. RefMap

The goal is to ensure that we find the corresponding string in Beacon's affectedfields array any time:

  • the job change would cause clients to get a Beacon notification
  • the field would be changed on the job

I've done my best to identify these cases. For each of them, I include:

  • A GIF of me causing the Beacon message in an Incognito browser session, and then collecting the Beacon message in the Network tab of another browser session for a different user on the same team
  • A copy-paste of the Beacon message

Permissions and Roles

The only way I've found to cause a Beacon Job Change message when messing around with Roles is by archiving a Role that is used by a Job.

GIF

Beacon Message:

{"type":"job","jobid":"f0d8b292-915e-476a-9e99-356adabec166","action":"permissions_change","affectedfields":["permissions","users","roles"]}

Templates and References

To get a Beacon message in response to Template or Reference changes, we can only add Steps, StepGroups or Templates to a Job.

Add Template

GIF

Beacon Message:

{"type":"job","jobid":"ece578ad-37cd-41ef-8348-3f672a559e22","action":"stepgroup_add","affectedfields":["steps","stats","templates","refMap","snapshottedDataSheetValues","plannedDataSheetIds","rootHeaders"]} 

Add Step Group

GIF

{"type":"job","jobid":"ece578ad-37cd-41ef-8348-3f672a559e22","action":"stepgroup_add","affectedfields":["steps","stats","templates","refMap","snapshottedDataSheetValues","plannedDataSheetIds","rootHeaders"]}

Add Step

GIF

{"type":"job","jobid":"ece578ad-37cd-41ef-8348-3f672a559e22","action":"step_add","affectedfields":["steps","stats","templates","refMap","snapshottedDataSheetValues","plannedDataSheetIds","rootHeaders"]} 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment