Skip to content
Snippets Groups Projects
Commit c9c3abe8 authored by Simon Leipold's avatar Simon Leipold
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1085726][Erweiterung der Indexsuche um Tag-Suche]

parent 71f75e7f
No related branches found
No related tags found
No related merge requests found
Removes leading hashtags of favorite titles. This is necessary because hashtags for public tags are implemented. It is not possible anymore to create tags with a leadhing '#'.
\ No newline at end of file
import("system.logging");
import("system.db");
var recordgroups = db.table("select ID, TITLE from ASYS_RECORDGROUP where TITLE like '#%' and GROUP_TYPE != 'HASHTAG'");
var table = "ASYS_RECORDGROUP";
var cols = ["TITLE"];
var vals = [];
recordgroups.forEach(function(recordgroup) {
var id = recordgroup[0];
var title = recordgroup[1];
var cond = "ID = '" + id + "'";
vals.push(title.trim().substring(1));
db.updateData(table, cols, null, vals, cond);
});
<?xml version="1.0" encoding="UTF-8"?>
<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.2">
<name>removeHashtagsFromFavoriteTitles</name>
<title>remove hashtags from favorite titles</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/process/removeHashtagsFromFavoriteTitles/documentation.adoc</documentation>
<process>%aditoprj%/process/removeHashtagsFromFavoriteTitles/process.js</process>
<alias>_____SYSTEMALIAS</alias>
<variants>
<element>EXECUTABLE</element>
</variants>
</process>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment