{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":8845725,"defaultBranch":"master","name":"alloc","ownerLogin":"cyberitsolutions","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2013-03-18T02:39:26.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/16787479?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1717052131.0","currentOid":""},"activityList":{"items":[{"before":null,"after":"7cd8a43e226b878ef45e52a6e50809fdb78f87f3","ref":"refs/heads/heavy-kludges","pushedAt":"2024-05-30T06:55:31.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"trentbuck","name":"Trent W. Buck","path":"/trentbuck","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/64124132?s=80&v=4"},"commit":{"message":"make reminder textarea bigger by default\n\n16:12 Sorry, I hadn't seen that in scrollback yet\n16:12 If this is for alloc, I am 100% open to just patching alloc\n16:13 You just want https://alloc.cyber.com.au/reminder/reminder.php?step=3&reminderID=7267&returnToParent=task to be taller, without having to drag the drag handle every time?\n16:14 twb: in edit mode, I was the 'description' field to be much taller\n16:15 all that wasted screen real-estate, and I have to drag the fucking thing to be able to type anything useful in it\n16:15 IMO the best answer is for me to patch alloc to remove style=height:40px and add cols=25\n16:15 cols?\n16:15 or rows?\n16:16 You're already using Stylus for other Alloc things IIRC, it's not worth touching Alloc right now if your system works and it has already been solved. But yes, we can apply that patch to Alloc easily, and it's probably the \"right\" answer longer term... aside from burning it alive\n16:16 Sorry, rows=. cols= is already there\n16:16 BBB: :)\n16:16 https://i.imgur.com/8eQSfT8.png\n16:17 Patching alloc will suck.\n16:17 For something that confined I know exactly how to do it\n16:17 I wouldn't bother at this stage. That part of the code is all templated\n16:18 ftr, I've already checked out of this topic because it's already solved. 😉\n16:18 CCC: Oh wait you're right\n16:18 [CCC nods sagely]\n16:19 And I'm not digging any further into how the fuck that works. I couldn't even be bothered generating a link to the code on Github.\n16:19 reminder/templates/reminderM.tpl: {page::textarea(\"reminder_content\",$reminder_default_content,array(\"height\"=>\"small\"))}\n16:19 So I could easily change \"small\" to \"medium\" but I couldn't easily add rows=25","shortMessageHtmlLink":"make reminder textarea bigger by default"}},{"before":"05539b5794e38b212c4b808438fbdbc58783fde8","after":"4a552455dbb1af2808144f941c6c9b330da01b6d","ref":"refs/heads/master","pushedAt":"2024-05-23T03:26:50.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"cjbayliss","name":"Christopher Bayliss","path":"/cjbayliss","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/39289951?s=80&v=4"},"commit":{"message":"umaintained","shortMessageHtmlLink":"umaintained"}},{"before":"1af76c768650219216de3e9bb200da359e8d6987","after":"747d2f61578233d1cd30a5cafb754da7cd65570c","ref":"refs/heads/cjb-experiment-php7-second-attempt","pushedAt":"2024-05-23T03:11:21.000Z","pushType":"push","commitsCount":177,"pusher":{"login":"cjbayliss","name":"Christopher Bayliss","path":"/cjbayliss","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/39289951?s=80&v=4"},"commit":{"message":"fix xdebug config","shortMessageHtmlLink":"fix xdebug config"}},{"before":null,"after":"58026a06179802868103ccc7d0fb57b0352db241","ref":"refs/heads/35019-support-mariadb-10.6","pushedAt":"2023-09-22T05:59:20.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"trentbuck","name":"Trent W. Buck","path":"/trentbuck","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/64124132?s=80&v=4"},"commit":{"message":"If you see \"utf8mb3\" in MariaDB 10.6+, tell PHP to encode as \"utf8\".\n\nPHP does not know what \"utf8mb3\" is.\nhttps://mariadb.com/kb/en/upgrading-from-mariadb-10-5-to-mariadb-10-6/#character-sets\nSep 18 12:56:15 heavy uwsgi[5940]: PHP Warning: mb_convert_encoding(): Unknown encoding "utf8mb3" in /var/www/alloc/email/lib/email_receive.inc.php on line 737\nhttps://alloc.cyber.com.au/task/task.php?taskID=35019\nhttps://alloc.cyber.com.au/task/task.php?taskID=35012","shortMessageHtmlLink":"If you see \"utf8mb3\" in MariaDB 10.6+, tell PHP to encode as \"utf8\"."}},{"before":null,"after":"985dac8fc8ce9e7bd0f6596a1cc518baccf6418b","ref":"refs/heads/34950-fix-alloc-for-mariadb-10.11","pushedAt":"2023-07-01T05:45:58.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"trentbuck","name":"Trent W. Buck","path":"/trentbuck","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/64124132?s=80&v=4"},"commit":{"message":"In MariaDB 10.11, \"empty\" is a reserved word?\n\nAfter upgrading from MariaDB 10.5 to 10.11,\n\n FAILS: SELECT empty('fart');\n WORKS: SELECT alloc.empty('fart');\n WORKS: SELECT neq(1, 1);\n WORKS: SELECT alloc.new(1, 1);\n\nTherefore I speculate that \"empty\" now has special meaning.\nTherefore let's try simply renaming it from \"empty\" to \"emptyXXX\".\nAs this stored function is only used in this one file, that should be easy?\n\n https://github.com/cyberitsolutions/alloc/blob/1.9.0/installation/db_triggers.sql#L31\n\nThis seems to fix my immediate issue on alloc.cyber.com.au.\n\n14:58 *** twb JOIN ircs://irc.libera.chat/%23mariadb\n14:58 *** TOPIC Welcome to the new and official MariaDB chat server! You can also use https://mariadb.zulipchat.com for more targeted discussions (monty_!~monty_@62.248.255.24 on Wed May 26 23:56:16 2021)\n15:00 Hi, I have an ancient PHP5 web app I have to keep limping along. I upgraded it to MariaDB mariadb-server 1:10.5.19-0+deb11u2 earlier without issues; I upgraded from that to 1:10.11.3-1 yesterday and now I'm getting errors \"Failed to load routine alloc.get_most_recent_non_archived_taskStatus (internal code -6). For more details, run SHOW WARNINGS\" which SHOW WARNINGS turns into \"Undeclared variable: empty\".\n15:01 Looking at the stored procedures I see a lot of stuff like \"BEGIN IF empty(NEW.dateFrom) OR empty(NEW.dateTo) THEN ⋯\"\n15:01 Is empty() a mariadb thing or is that something the app has invented?\n15:04 OK found it: https://github.com/cyberitsolutions/alloc/blob/1.9.0/installation/db_triggers.sql#L31\n15:05 So the next question I guess is \"how do I list all stored procedures?\"\n15:07 I can see the \"empty\" procedure exists\n\n MariaDB [alloc]> select * from information_schema.routines where specific_name = 'empty';\n *************************** 1. row ***************************\n SPECIFIC_NAME: empty\n ROUTINE_CATALOG: def\n ROUTINE_SCHEMA: alloc\n ROUTINE_NAME: empty\n ROUTINE_TYPE: FUNCTION\n DATA_TYPE: tinyint\n CHARACTER_MAXIMUM_LENGTH: NULL\n CHARACTER_OCTET_LENGTH: NULL\n NUMERIC_PRECISION: 3\n NUMERIC_SCALE: 0\n DATETIME_PRECISION: NULL\n CHARACTER_SET_NAME: NULL\n COLLATION_NAME: NULL\n DTD_IDENTIFIER: tinyint(1)\n ROUTINE_BODY: SQL\n ROUTINE_DEFINITION: BEGIN RETURN str = '' OR str IS NULL; END\n EXTERNAL_NAME: NULL\n EXTERNAL_LANGUAGE: NULL\n PARAMETER_STYLE: SQL\n IS_DETERMINISTIC: YES\n SQL_DATA_ACCESS: CONTAINS SQL\n SQL_PATH: NULL\n SECURITY_TYPE: DEFINER\n CREATED: 2022-11-08 12:46:44\n LAST_ALTERED: 2022-11-08 12:46:44\n SQL_MODE:\n ROUTINE_COMMENT:\n DEFINER: root@localhost\n CHARACTER_SET_CLIENT: utf8\n COLLATION_CONNECTION: utf8_general_ci\n DATABASE_COLLATION: utf8mb4_general_ci\n 1 row in set, 1 warning (0.007 sec)\n\n15:09 So I guess this is just an issue with whether triggers can \"see\" store procedures\n15:13 Correction: it's a stored function not a stored procedure.\n15:19 Fails: MariaDB [alloc]> select empty('fart'); --error--> \"You have an error in your SQL syntax\"\n15:19 Works: MariaDB [alloc]> select alloc.empty('fart'); --> 0\n15:20 Why do I have to explicitly say the namespace/database, when it's already selected (per the prompt on the left)?\n15:22 I can create a new function delete_me_test_function and then select it as either delete_me_test_function or alloc.delete_me_test_function\n15:23 So this seems like maybe \"empty\" is a new reserved word??? It's not mentioned in the upgrade notes on https://mariadb.com/kb/en/upgrading/\n15:33 OK that's interesting. I tried to run this and I got \"ERROR 1064 (42000) at line 38: Trigger 'before_update_task' has an error in its body: 'Undeclared variable: empty'\"\n\n -- After upgrading from MariaDB 10.5 to 10.11,\n -- FAILS: SELECT empty('fart');\n -- WORKS: SELECT alloc.empty('fart');\n -- WORKS: SELECT neq(1, 1);\n -- WORKS: SELECT alloc.new(1, 1);\n --\n -- Therefore I speculate that \"empty\" now has special meaning.\n -- Therefore let's try simply renaming it from \"empty\" to \"emptyXXX\".\n -- As this stored function is only used in this one file, that should be easy?\n -- https://github.com/cyberitsolutions/alloc/blob/1.9.0/installation/db_triggers.sql#L31\n DELIMITER $$\n\n -- if (NOT something) doesn't work for NULLs\n DROP FUNCTION IF EXISTS emptyXXX $$\n CREATE FUNCTION emptyXXX(str text) RETURNS BOOLEAN DETERMINISTIC\n BEGIN RETURN str = '' OR str IS NULL; END $$\n\n DROP FUNCTION IF EXISTS get_most_recent_non_archived_taskStatus $$\n CREATE FUNCTION get_most_recent_non_archived_taskStatus(tID INTEGER) RETURNS varchar(255) READS SQL DATA\n BEGIN\n DECLARE rtn varchar(255);\n SELECT value INTO rtn FROM audit\n WHERE taskID = tID\n AND value != 'closed_archived'\n AND field = 'taskStatus'\n ORDER BY auditID DESC\n LIMIT 1;\n\n IF (emptyXXX(rtn)) THEN\n SELECT 'open_notstarted' INTO rtn;\n END IF;\n RETURN rtn;\n END\n $$\n\n DROP TRIGGER IF EXISTS before_insert_task $$\n CREATE TRIGGER before_insert_task BEFORE INSERT ON task\n FOR EACH ROW\n BEGIN\n DECLARE defTaskLimit DECIMAL(7,2);\n call check_edit_task(NEW.projectID);\n\n IF (NEW.parentTaskID) THEN CALL check_for_parent_task_loop(NEW.parentTaskID, NULL); END IF;\n\n SET NEW.creatorID = personID();\n SET NEW.dateCreated = current_timestamp();\n\n -- inserted closed edge-case\n IF (substring(NEW.taskStatus,1,6) = 'closed') THEN\n SET NEW.dateActualCompletion = current_date();\n END IF;\n\n IF (emptyXXX(NEW.taskStatus)) THEN SET NEW.taskStatus = 'open_notstarted'; END IF;\n IF (emptyXXX(NEW.priority)) THEN SET NEW.priority = 3; END IF;\n IF (emptyXXX(NEW.taskTypeID)) THEN SET NEW.taskTypeID = 'Task'; END IF;\n IF (NEW.personID) THEN SET NEW.dateAssigned = current_timestamp(); END IF;\n IF (NEW.closerID) THEN SET NEW.dateClosed = current_timestamp(); END IF;\n IF (emptyXXX(NEW.timeLimit)) THEN SET NEW.timeLimit = NEW.timeExpected; END IF;\n\n IF (emptyXXX(NEW.timeLimit) AND NEW.projectID) THEN\n SELECT defaultTaskLimit INTO defTaskLimit FROM project WHERE projectID = NEW.projectID;\n SET NEW.timeLimit = defTaskLimit;\n END IF;\n\n IF (emptyXXX(NEW.estimatorID) AND (NEW.timeWorst OR NEW.timeBest OR NEW.timeExpected)) THEN\n SET NEW.estimatorID = personID();\n END IF;\n\n IF (emptyXXX(NEW.timeWorst) AND emptyXXX(NEW.timeBest) AND emptyXXX(NEW.timeExpected)) THEN\n SET NEW.estimatorID = NULL;\n END IF;\n\n IF (NEW.taskStatus = 'open_inprogress' AND emptyXXX(NEW.dateActualStart)) THEN\n SET NEW.dateActualStart = current_date();\n END IF;\n END\n $$\n\n DROP TRIGGER IF EXISTS before_update_task $$\n CREATE TRIGGER before_update_task BEFORE UPDATE ON task\n FOR EACH ROW\n BEGIN\n call check_edit_task(OLD.projectID);\n\n IF (neq(@in_change_task_status,1) AND neq(OLD.taskStatus,NEW.taskStatus)) THEN\n call alloc_error('Must use: call change_task_status(taskID,status)');\n END IF;\n\n IF (NEW.parentTaskID) THEN CALL check_for_parent_task_loop(NEW.parentTaskID, OLD.taskID); END IF;\n\n SET NEW.taskID = OLD.taskID;\n SET NEW.creatorID = OLD.creatorID;\n SET NEW.dateCreated = OLD.dateCreated;\n SET NEW.taskModifiedUser = personID();\n\n IF (emptyXXX(NEW.taskStatus)) THEN\n SET NEW.taskStatus = OLD.taskStatus;\n END IF;\n\n IF (emptyXXX(NEW.taskStatus)) THEN\n SET NEW.taskStatus = 'open_notstarted';\n END IF;\n\n IF (NEW.taskStatus = 'open_inprogress' AND neq(NEW.taskStatus, OLD.taskStatus) AND emptyXXX(NEW.dateActualStart)) THEN\n SET NEW.dateActualStart = current_date();\n END IF;\n\n IF ((SUBSTRING(NEW.taskStatus,1,4) = 'open' OR SUBSTRING(NEW.taskStatus,1,4) = 'pend')) THEN\n SET NEW.closerID = NULL;\n SET NEW.dateClosed = NULL;\n SET NEW.dateActualCompletion = NULL;\n SET NEW.duplicateTaskID = NULL;\n ELSEIF (SUBSTRING(NEW.taskStatus,1,6) = 'closed' AND neq(NEW.taskStatus, OLD.taskStatus)) THEN\n IF (emptyXXX(NEW.dateActualStart)) THEN SET NEW.dateActualStart = current_date(); END IF;\n IF (emptyXXX(NEW.dateClosed)) THEN SET NEW.dateClosed = current_timestamp(); END IF;\n IF (emptyXXX(NEW.closerID)) THEN SET NEW.closerID = personID(); END IF;\n SET NEW.dateActualCompletion = current_date();\n END IF;\n\n IF (NEW.personID AND neq(NEW.personID, OLD.personID)) THEN\n SET NEW.dateAssigned = current_timestamp();\n ELSEIF (emptyXXX(NEW.personID)) THEN\n SET NEW.dateAssigned = NULL;\n END IF;\n\n IF (NEW.closerID AND neq(NEW.closerID, OLD.closerID)) THEN\n SET NEW.dateClosed = current_timestamp();\n ELSEIF (emptyXXX(NEW.closerID)) THEN\n SET NEW.dateClosed = NULL;\n END IF;\n\n IF ((neq(NEW.timeWorst, OLD.timeWorst) OR neq(NEW.timeBest, OLD.timeBest) OR neq(NEW.timeExpected, OLD.timeExpected))\n AND emptyXXX(NEW.estimatorID)) THEN\n SET NEW.estimatorID = personID();\n END IF;\n\n IF (emptyXXX(NEW.timeWorst) AND emptyXXX(NEW.timeBest) AND emptyXXX(NEW.timeExpected)) THEN\n SET NEW.estimatorID = NULL;\n END IF;\n\n END\n $$\n\n DROP TRIGGER IF EXISTS before_insert_absence $$\n CREATE TRIGGER before_insert_absence BEFORE INSERT ON absence\n FOR EACH ROW\n BEGIN\n IF emptyXXX(NEW.dateFrom) OR emptyXXX(NEW.dateTo) THEN\n call alloc_error('Absence must have a start and end date.');\n END IF;\n END\n $$\n\n DROP TRIGGER IF EXISTS before_update_absence $$\n CREATE TRIGGER before_update_absence BEFORE UPDATE ON absence\n FOR EACH ROW\n BEGIN\n IF emptyXXX(NEW.dateFrom) OR emptyXXX(NEW.dateTo) THEN\n call alloc_error('Absence must have a start and end date.');\n END IF;\n END\n $$\n\n DELIMITER ;\n\n15:35 dropping 2 triggers manually and then re-running seems to have at least not errored.\n\n MariaDB [alloc]> DROP TRIGGER IF EXISTS before_update_task;\n Query OK, 0 rows affected (0.079 sec)\n\n MariaDB [alloc]> DROP TRIGGER IF EXISTS before_update_absence;\n Query OK, 0 rows affected (0.093 sec)\n\n twb@hera[Desktop]$ ssh root@heavy mariadb alloc < alloc_db_triggers_workaround_empty_problem.sql\n\n15:36 OK I can create timesheets again! Yay!","shortMessageHtmlLink":"In MariaDB 10.11, \"empty\" is a reserved word?"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEV7HIegA","startCursor":null,"endCursor":null}},"title":"Activity · cyberitsolutions/alloc"}