Skip to main content Help Control Panel

Login   A+   A-

Community «   Discussion forum «   Post your requirements here «  

Automaticaly add article ID in either Title or Introduction

avatarBoen, Jan -- on Dec. 20 2006
Why? Use YACS as simple trouble ticketing system
In order to have a unique TT reference it would be great that either in the "Title" or "Introduction" we could insert at the moment of creation a unique TT ID. This could be as simple as the document ID. Example "TT-11-" The "TT- -" is fixed text and "11" is the actual article ID.

Is there a way we can this or something similar. It should be a field that is searchable if possible.
NickR
avatar
from West Yorkshire, UK
332 posts

on Dec. 20 2006


Jan,

I am sure Bernard will reply, but I know he is using an overlay to record issues right on this forum in the Bugs and problems section and that records an id, I have only had a brief look at this overlay (included in 6.12) but it should not be too difficult to modify the query that generates the data from the submitted new article to append the id to either the title or introduction as required.

At a quick guess, the overlay called issues could be modified (line 505) from

."title='".SQL::escape($title)."', \n"

to

."title='".SQL::escape($title)."-"..(SQL::get_last_id() +1)."-"', \n"

Nick
Bernard
avatar
from nearby-an-airport
Associate, 6696 posts

on Dec. 20 2006


Jan: NickR is right, you should take a look at the reference script aiming to build simple trackers, in overlays/issue.php, which is demonstrated in our forum, at [section=168]. Note how issue tracking has been blended into a discussion board, and how live titles reflect issue status in brackets ([Reproduced], [Solved], ...). Moreover, the overlay also feeds a separate MySQL table, meaning you can add tables to report on you tracking system. This is also demnstrated here, at Problèmes en cours de traitement. Have fun!

Rate this page
Posted by Jan B on Dec. 20 2006, commented by Bernard on Dec. 20 2006, (popular)