Skip to content

Instantly share code, notes, and snippets.

View mickadoo's full-sized avatar
💭
Making bugs

Michael Devery mickadoo

💭
Making bugs
  • Ireland
View GitHub Profile
@mickadoo
mickadoo / openzen.js
Created January 6, 2017 09:26
Open all zendesk tickets from your inbox in one click. Store as browser bookmark and click on from inbox screen. Not tested with gmail.
javascript:(
function(){
var links = document.getElementsByClassName("bV");
for(var i = 0; i < links.length; i++)
{
var link = (links.item(i));
if (link.text == 'View ticket') {
window.open(link.getAttribute('href'));
} else {
console.log('not expected' + link.text);
@mickadoo
mickadoo / buildkit-setup.sh
Created May 2, 2017 14:34
install tools required for civihr / buildkit
echo "mysql-server-5.5 mysql-server/root_password password root" | sudo debconf-set-selections
echo "mysql-server-5.5 mysql-server/root_password_again password root" | sudo debconf-set-selections
sudo apt-get update
sudo apt-get install -y \
curl \
vim \
man-db \
mysql-server \
git \
php5 \
@mickadoo
mickadoo / pairfind.php
Last active June 7, 2017 06:41
Sort a dataset of school IDs and group IDs into pairs of the same group, but where school ID must be different
<?php
$pairs = [];
$dataSet = [];
const SCHOOL_ID_COL = 0;
const GROUP_ID_COL = 1;
// load data
$fileName = __DIR__ . '/matching_problem.csv';
// one to many result
{
  "id": 1,
  "first_name": "john",
  "phones": [
    {
      "id": 1,
      "number": "40939394"
 }

Scenario 1:

  • Created user account but no email sent
  • Come back and send the email

RESULT: Welcome email received, login sucessful

Scenario 2:

  • Created user account and email sent
{
"siteUrl": "compucorp.civihrhosting.co.uk",
"siteName": "Compucorp",
"lastLoginByRole": {
"civihr_staff": "2012-04-23T18:25:43+0000",
"civihr_manager": "2012-04-23T18:25:43+0000",
"civihr_admin": "2012-04-23T18:25:43+0000",
"civihr_local_admin": "2012-04-23T18:25:43+0000",
"administrator": "2012-04-23T18:25:43+0000",
"custom_role": "2012-04-23T18:25:43+0000",
<?php
interface FabricatorInterface {
/**
* @param array $params
*
* @return array
*/
public function fabricate($params = []);
@mickadoo
mickadoo / configurability_changes.md
Last active February 22, 2018 15:26
Configurability Changes

1) Lock custom groups

Overview

Some custom groups are required by CiviHR and should not be editable.

Acceptance Criteria

The following custom groups do not appear on the civicrm/admin/custom/group page:

@mickadoo
mickadoo / is_reserved_meaning.md
Last active March 29, 2018 11:10
Discussion on the current meaning of `is_reserved` and `is_locked` in CiviCRM. Suggestions for improvements.

DAO Definitions

These definitions are from the docblock comment on the DAO properties. A quick search for public $is_reserved showed 10 entities with this property, but I will focus on these three for now.

Option Group
  • is_reserved: Is this a predefined system option group (i.e. it can not be deleted)?
  • is_locked: A lock to remove the ability to add new options via the UI.
Option Value