!! Alex Sokolov Tasks Plugin Set

%%tabbedSection

%%tab-Intro
\\
Thanks a lot to NascifAbousalhNeto for really great TasksPlugin set.\\
Please refer TasksPlugin page for original plugins and documentation.
\\
\\
I updated a little bit most of Tasks Plugins and created one additional plugin to extend Tasks Plugins functionality.
\\
\\
My changes make TasksPlugin more flexible and more comfortable for me(IMHO).
The most changes are around of flexible Page Names. Also I made some methods be public static to allow me create my own plugin TasksFormSelectPlugin. 
\\
\\
My additional TasksFormSelectPlugin allows to define special FormSelect widgets for [WikiForms|http://www.jspwiki.org/wiki/WikiFormsExample] that takes Items from WikiPages created by TasksPlugin!!! This is very useful if u want to use TasksPlugin as many as I use it:-))Because now you never need to hardcode select options inside page. All what you need just define second pages set:-)) This is very useful!
%%
%%tab-NascifAbousalhNetoTasks
!!My changes in NascifAbousalhNeto's TasksPlugin 
! Totally Flexible Name Prefix (Incompatibility with original TasksPlugin!!!)
In original TasksPlugin the Page Name defined as {{{<PREFIX>_tsk_<INDEX>}}}, where middle part ''_tsk_'' was hardcoded. So you always defined just page name prefix as parameter ''PAGE'' in FormSetPlugin call.
\\
Example:
{{{
[{FormSet form='taskform' 
   status='TaskOpened' 
   title=''
   fields='reastype,reason,country,title,developer,startdate,enddate,status'
   page='Task'
}]
}}}
I removed this restriction. In my version you take complete control on Page Name prefix. Now you will put to ''PAGE'' parameter __COMPLETE__ name prefix. New form of page name is  {{{<PREFIX><INDEX>}}}.
\\
Syntax:
PAGE=<COMPLETE_PREFIX>
Example:
{{{
[{FormSet form='taskform' 
   status='TaskOpened' 
   title=''
   fields='reastype,reason,country,title,developer,startdate,enddate,status'
   page='Task_tsk_'
}]
}}}
__PLEASE PAY ATTENTION__ that this change is involving __IMCOMPATIBILITY ISSUE__ with original syntax!!! __Don't forget to change all ''PAGE'' parameter to new format.__  
! Page __Naming__ based on field value
In original TasksPlugin the name of file is based on incremental integer value {{{<PREFIX>_tsk_<INDEX>}}}, e.g. Tasks_tsk_123. This is only way in original plugin. This is reasonably usefull if you using TasksPlugin for things like Defects or Incidents. 
\\
But what you can say about project named like prj_tsk_23? So I develop some changes to allow create pages with ''human friendly'' names {{{<PREFIX><FIELDVALUE>}}}. Now new page names could be e.g. prjNewMarketingProductLaunch or tasks_item_StopWorksWithComputer. 
\\
To do this I developed new parameter ''NAMING''. It will be equals form field name which value should be used for page name creations. Usually this is predefined field ''title''.  
\\
Syntax:
{{{NAMING=<fieldname>}}}
\\
Example:\\
{{{NAMING=title}}} means use value for title field for page name.\\
Complete example for FormSet:
{{{
[{FormSet form='taskform' 
   status='TaskOpened' 
   title=''
   fields='reastype,reason,country,title,developer,startdate,enddate,status'
   page='Task_tsk_'
   naming=title
}]
}}}
This functionality is very useful in combination with TasksFormSelectPlugin.   
%%
%%tab-TasksFormSelect
! TasksFormSelectPlugin
This plugin creates WikiForms Select widget using result of TasksQuery as select options list.\\
This is very useful if you have two page lists based on TasksPlugins and you need to refer from one page list to second. \\
E.g. we have Tasks page set (''tsk'') and Projects (''prj''). We need to refer for Task to which Project it belongs. We want to choise Project when creating Task using TasksPlugin.
Without this plugin are two options:
* use WikiForms FormSelect with static list of projects. You will allways update wikipage to redefine actual project list.
* use FormInput and manually input Project name.
This plugin suggests revollutionary other way. Most comfortable for most users. 
This plugin allows define special kind of WikiForms Select widget that fetching data from TasksPlugin pages (like TaskQuery). 
\\Syntax:
{{{
[{TasksFormSelect name='<fieldname>'  wikilink='<yes|no>'
  select='<fieldname>' 
  from='<page>' 
  where '<condition>'}] 
}}}
\\Parameters:\\
;name:<fieldname> - name of field from current Form to which select result should be placed. The same meaning and syntax as in original FormSelect.
;wikilink:<yes|no> - If wikilink='yes' so select items will be framed within {{{[]}}} characters. And select result downright also. 
The parameters ''select'', ''from'', ''where'' are identical to simular parameters of TasksQuery plugin.\\
I not recomended to use more then one field name in ''select'' and more than one page prefix name in ''from''.
;select:<fieldname>-name of field which will be selected from ''<page>''* pages which condition ''<condition>''.
;from:<page>-page prefix for pages select.
;where:<condition>-condition for pages select.  
\\Example:
{{{
[{TasksFormSelect name='reason' wikilink='yes'
  select='title' 
  from='Task_tsk_' 
  where 'status~(NewTask)|(Analysis)|(Development)|(Debugging)|(Testing)|(ReadyForProd)'}] 
}}}
This example creates FormSelect with select options list equals list of values for field task from pages '''Tasks_tsk_*'. The values will be framed in {{{[]}}}. 
%%
%%tab-Spec

TasksFormSelectPlugin placed in
|| Attribute || Value
| Package | {{org.asokolov.jspwiki.plugin.tasks}}
| JSPWiki version | 2.4.xx
| JDK version | 5.0 
| Contact | AlexSokolov
All other plugins are originally developed by NascifAbousalhNeto. Thanks a lot to him!!! 
I just made my ''little'' changes to his package.
|| Attribute || Value
| Package | {{org.nascif.jspwiki.plugin.tasks}}
| JSPWiki version | 2.4.xx
| JDK version | 5.0 
| Contact | AlexSokolov for new functionality mentioned on this page, NascifAbousalhNeto is original author.
 
* The tasks-<YYYYMMDD>.jar package contains ready-for-deployment version of both mentioned packages.

* The tasks-<YYYYMMDD>-src.jar package contains source code for packages.
%%
%%tab-InstallationGuide
!Short installation Guide for plugin.
TIP! Always backup important files that plans to change before to do changes.
* Place tasks-<YYYYMMDD>.jar to <your_wiki_app>/WEB_INF/lib/ catalog.
* Edit your <your_wiki_app>/WEB_INF/jspwiki.properties to add our plugin packages org.nascif.jspwiki.plugin.tasks,org.asokolov.jspwiki.plugin.tasks to searchPath.
Example:
{{{
jspwiki.plugin.searchPath = org.nascif.jspwiki.plugin.tasks,org.asokolov.jspwiki.plugin.tasks,com.bradfordholcombe.JSPWiki.filters
}}}
\\
* Don't forget to restart your web server as last step
* Enjoy
\\
Please refer [Plugins] for more information.
%%
%%tab-ChangeLog
* ''2007-02-21'' -- AlexSokolov Initial release of my changes for internal usage
* ''2007-03-11'' -- AlexSokolov Publishing of plugins and this page
%%
%%tab-Discussion
Hi Alex,\\
Nice changes! I like the TasksFormSelect a lot. Is it OK if I add them to a future version of the TasksPlugin? I would prefer to have just one version around instead of two to prevent confusion and incompatibility versions in the future. --[NascifAbousalhNeto] - 12-Mar-2007
\\
\\
--Hi Nascif!!!\\
Sorry of long delay for my comments!\\
I'll realy glad if you'll add my changes to [TasksPlugin].\\
Again thank you for it.\\
I'm not guru in Java,\\
but if it possible I'll help you with improve for your nice plugin.\\
Best regards,\\
Alex.\\
%%
%%