P Richards | 24 Apr 22:25 2014

Custom Field API Query

 

I’m confused…

 

Given that “check_selected” needs to have matching data types, and we do a:

 

(strtolower($item) != 0)

 

I’ve fixed a few other issues with check_selected (which may or may not be caused by db layer 2), but I don’t actually understand what we are doing here…

 

  C:\mantisforge\github\mantisbt\core\constant_inc.php (1 hit)

                Line 438: define( 'META_FILTER_ANY', 0 );

 

if(( utf8_strtolower( $t_item ) !== META_FILTER_ANY ) && ( utf8_strtolower( $t_item ) !== META_FILTER_NONE ) ) {

echo '<option value="' . string_attribute( $t_item ) . '"';

                                if( isset( $t_filter['custom_fields'][$p_field_id] ) ) {

                                                check_selected( $t_filter['custom_fields'][$p_field_id], $t_item );

 

 

  C:\mantisforge\github\mantisbt\api\soap\mc_issue_api.php (2 hits)

                Line 470:              $t_any = defined( 'META_FILTER_ANY' ) ? META_FILTER_ANY : 'any';

                Line 470:              $t_any = defined( 'META_FILTER_ANY' ) ? META_FILTER_ANY : 'any';

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
mantisbt-dev mailing list
mantisbt-dev@...
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev
P Richards | 23 Apr 00:56 2014

Plugin group on github

Whilst going through the plugin group on github tonight, I came across:

 

https://github.com/mantisbt-plugins/codev

 

This does not look like a “real” plugin – it isn’t.

 

Is there somewhere better this can live so it’s clear to users what is actually a Mantis Plugin?

 

In addition, this code currently does not make use of our database API – there are at least 32 queries generated by utilising the ‘mysql_query’ functions and not db_query or db_query_bound

 

Surely, we should ensure some level of quality bar on the plugins that we promote as plugins…???

 

Whilst I can see that the ‘codev’ thing might be a useful resource so should live somewhere, It does not really meet the definition of a ‘plugin’

 

 

 

 

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
mantisbt-dev mailing list
mantisbt-dev@...
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev
P Richards | 23 Apr 00:51 2014

DB Layer 2 - Type Checking

This is something that was mentioned by Victor initially, when he saw that at that point there was no enforcement of type’s

 

I’ve started adding code (currently testing under MSSQL only) to check the types of data both going IN and OUT of db queries.

 

For now, this is located at:

 

https://github.com/grangeway/mantisbt/blob/dbapi/core/database_api.php#L171

 

https://github.com/grangeway/mantisbt/blob/dbapi/core/database_api.php#L204

 

https://github.com/grangeway/mantisbt/blob/dbapi/core/classes/MantisDatabase/PDO/PDO.class.php#L177

 

I’ve not got time tonight to separate it out of the main files into the different database engines, but can anyone see any obvious problems with this approach? (albeit given it obviously need to be handled per-database-engine and not in it’s current form)

 

Paul

 

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
mantisbt-dev mailing list
mantisbt-dev@...
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev
P Richards | 23 Apr 00:44 2014

Mantis 2.0 - Plugins

I’ve made the attached list of plugins, based on what I could easily find

 

Currently it shows name of plugin, and whether the plugin is known to use DB_* functions within mantis and make schema modifications

 

Roland:

 

You mentioned that you are aware of  plugins that are:

 

- that are not hosted on Github

- that are not available in a source repository but attached as .zip files in our Mantis installation

 

Can you give me a list of the plugins  that you are aware of that fall into this category ?

 

I plan to start looking at Plugin support for the new DB Layer at some point towards the end of this week.

 

Paul

 

 

Attachment (plugins.docx): application/vnd.openxmlformats-officedocument.wordprocessingml.document, 20 KiB
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
mantisbt-dev mailing list
mantisbt-dev@...
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev
P Richards | 22 Apr 00:04 2014

Db Layer 2 - Oracle Schema

This will follow tomorrow – I’ve not forgotten it

 

As an aside, I’ve got a question regarding the current ADODB layer for Oracle relating to the following code:

 


         function
CreateDatabase($dbname, $options=false)

         {

                 $options = $this->_Options($options);

                 $password = isset($options['PASSWORD']) ? $options['PASSWORD'] : 'tiger';

                 $tablespace = isset($options["TABLESPACE"]) ? " DEFAULT TABLESPACE ".$options["TABLESPACE"] : '';

                 $sql[] = "CREATE USER ".$dbname." IDENTIFIED BY ".$password.$tablespace;

                 $sql[] = "GRANT CREATE SESSION, CREATE TABLE,UNLIMITED TABLESPACE,CREATE SEQUENCE TO $dbname";

 

Tiger???????????????

Does this mean someone can log in with ‘tiger’?

 

 

Paul

 

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
mantisbt-dev mailing list
mantisbt-dev@...
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev
P Richards | 22 Apr 00:02 2014

Db Layer 2 - MSSQL Schema

Hi All,

 

Attached is the schema I’m currently generating with the new db layer (mssql.schema).

 

I would be interested in any feedback/issues with the attached before I start trying to do any front end testing

 

 

 

Attachment (mssql.schema): application/octet-stream, 142 KiB
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
mantisbt-dev mailing list
mantisbt-dev@...
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev
P Richards | 22 Apr 00:01 2014

DB LAyer 2 - Mysql Schema

Hi All,

 

Attached is the MYSQL schema I’m currently generating with the new db layer (bugtracker-install).

 

The bugtracker-master is the schema that I generated from the existing adodb layer for comparision

 

 

 

Attachment (bugtracker-master.schema): application/octet-stream, 34 KiB
Attachment (bugtracker-install.schema): application/octet-stream, 34 KiB
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
mantisbt-dev mailing list
mantisbt-dev@...
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev
P Richards | 22 Apr 00:00 2014

DB Layer 2 - PGSQL Schema

Hi All,

 

Attached is the schema I’m currently generating with the new db layer (pgsql-bugtracker-install).

 

The pgsql-bugtracker-master is the schema that I generated from the existing adodb layer for comparision

Attachment (pgsql-bugtracker-master): application/octet-stream, 57 KiB
Attachment (pgsql-bugtracker-install): application/octet-stream, 57 KiB
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
mantisbt-dev mailing list
mantisbt-dev@...
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev
P Richards | 21 Apr 00:57 2014

Db Layer 2.0 - UNSIGNED INT's

I’d like some thoughts on the use of UNSIGNED.

 

MYSQL supports the use of unsigned to change -2^N to 2^N to 0 to 4^N for range of SQL integer values

 

PGSQL does not support ‘unsigned’.  Therefore the range would be -2^N to 2^N.

(I think one of oracle/mssql may also do the same as pgsql )

 

Whilst, I can’t see this being a major issue for most things as I doubt we exceed the 2^32 value anyway – that would be a lot of users or bugs!

 

I see 3 options to try and make the behaviour similar:

 

a)      Ignore this difference/problem

b)      Drop the use of UNSIGNED from new mysql

c)       Add a check constraint to PGSQL that the integer’s must be positive if the field is set to unsigned. Add a check that values are not >2^N when sending from php (so that mysql’s upper limit is enforced to the signed value from php), and such that PGSQL cannot store negative values.

 

Any thoughts?

 

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
mantisbt-dev mailing list
mantisbt-dev@...
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev
P Richards | 20 Apr 23:47 2014

Sponsorships

Different topic J

 

I’ve noticed today that the sponsorship API seems very ‘loose’ – is that deliberate?

 

For example, at an API level, we allow Sponsorship Paid to be set to any value. Logically, I’d expect it to track payment against the initial amount sponsored.

 

i.e. if someone decides to pay more than their initial sponsorship, I would kind of expect the sponsorship amount to either a) be updated when paying, or b) need to be updated first.

 

Do we consider this to behaviour a bug, or a deliberate act on our part as it’s there to loosely track and not as an invoicing system ?

 

Paul

 

 

 

 

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
mantisbt-dev mailing list
mantisbt-dev@...
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev
P Richards | 20 Apr 23:06 2014

PHPUnit Testing

I’ve found that for some API’s as it stands at the moment, we need to set:

 

                * <at> runInSeparateProcess

                * <at> preserveGlobalState disabled

 

to be able to reset state successfully (think static variables here ;))

 

At the moment, I’ve just set these values on the test(s) that require it.

 

However, I’m wondering whether it would make more sense to look at setting this globally for all tests.

 

Thoughts?

 

From I think the author of phpunit’s blog:

 

“The advantages of this include full test isolation and the fact that a test can now cause a PHP fatal error or even a segmentation fault of the PHP interpreter without interrupting the test execution. The fact that a fresh PHP interpreter is used for each test also results in reduced memory usage, especially for larger test suites.”

 

“However, the test execution takes longer due to startup and shutdown costs of the PHP processes.”

 

 

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
mantisbt-dev mailing list
mantisbt-dev@...
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev

Gmane