General discussion of OpenCATS

Moderators: RussH, cptr13

Forum rules: Just remember to play nicely once you walk through the door. You can disagree with us, or any other commenters in this forum, but keep comments directed to the topic at hand.
#4635
I wanted to share this workaround for anyone else having problems with Tags (and removing all from a single candidate), as I couldn't find any solutions out there.

Background: My team started using the tag feature, which is great for advanced sorting and filtering. Which is definitely a feature I encourage others to explore if they are not already doing so. However, in our current version 0.9.4, we were unable to remove all tags from a candidate. A proposed work around internally was to have a tag labeled 'None', but I thought this was a lame solution. After playing around with the code a bit, a quick workaround is to just add a hidden input with a fictitious static tagID in the form adding the tags(See Below). While this doesn't fix the ACTUAL issue going on here, this works just fine. In addition, and not required, a second step would be to add an extra query to remove that extra tag right after updating.


Workaround: File: ./opencats/modules/candidates/AssignCandidateTagModal.tpl add the following line inside the <form>:
Code: Select all
                <input type="hidden" id="candidateTAGG" name="candidate_tags[]" value="99999" />

Optional Second Part: File: ./opencats/lib/Tags.php add the line below after the $queryResult in the function AddTagsToCandidate near the very end of the file, Line 268 if it's the orig file.
Code: Select all
                $queryResult = $this->_db->query("delete from candidate_tag where tag_id = 99999");

Wasn't sure if I posted this in the right part of this forum, my bad if this was the wrong spot.
#4637
Hi Rob,

thank you for this. Sorry for the radio silence, have been building the release for php 7.x compatible version. I'll add this as a minor update to the release, unless you want to create a PR on github?

Discover Women Seeking Casual Encounters Tonight […]

Discover Women Looking for Spontaneous Nights Out[…]

okay - strange as disk is cheap! However if you wa[…]

Can anyone assist me? Much appreciated.