Git commit 4111239f65fcb4c86be63615d678fb1f4c4bd113 by Ralf Habacker. Committed on 30/06/2017 at 20:38. Pushed by habacker into branch 'master'. Add wrapper from umbrello.kde.org creating bug lists A +25 -0 bugs.php A +88 -0 lib.inc A +16 -0 openbugs.php A +16 -0 resolvedbugs.php https://commits.kde.org/websites/kmymoney-org/4111239f65fcb4c86be63615d678f= b1f4c4bd113 diff --git a/bugs.php b/bugs.php new file mode 100644 index 0000000..7b2702c --- /dev/null +++ b/bugs.php @@ -0,0 +1,25 @@ + +# = +# common wrapper for showing bug lists from bug.kde.org = +# +# syntax: +# bugs.php?/ +# +# - references the $urls array keys in lib.inc +# - version to show e.g 4.8.1 for the related version +# or 4.8 for all versions in this branch +# + include(dirname(__FILE__)."/lib.inc"); + $query =3D isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : "= "; + if (strpos($query,'/') !=3D=3D FALSE) + list($type, $version) =3D explode('/',$query); + else { + $type =3D $query; + $version =3D ""; + } + $url =3D buglist($type, $version); + if ($url) + Header("Location: $url"); +?> \ No newline at end of file diff --git a/lib.inc b/lib.inc new file mode 100644 index 0000000..6921b72 --- /dev/null +++ b/lib.inc @@ -0,0 +1,88 @@ + $baseColumns, + "resolved" =3D> "&columnlist=3Dcomponent%2Cbug_severity%2Cbug_status%2Cr= esolution%2Cshort_desc%2Cchangeddate%2Creporter_realname%2Ccf_versionfixedi= n", + "assigned" =3D> $baseColumns."%2Ctarget_milestone", + "todo" =3D> $baseColumns."%2Ctarget_milestone", + ); + = + $status =3D array( + "resolved" =3D> "&bug_status=3DRESOLVED&resolution=3DFIXED&resolution=3D= DUPLICATE&resolution=3DWORKSFORME&resolution=3DMOVED&resolution=3DUPSTREAM&= resolution=3DDOWNSTREAM", + "open" =3D> "&bug_status=3DUNCONFIRMED&bug_status=3DCONFIRMED&bug_status= =3DASSIGNED&bug_status=3DREOPENED&bug_status=3DNEEDSINFO", + "assigned" =3D> "&bug_status=3DASSIGNED", + "todo" =3D> "&bug_status=3DUNCONFIRMED&bug_status=3DCONFIRMED&bug_status= =3DREOPENED", + ); + + $url =3D "https://bugs.kde.org/buglist.cgi?product=3Dkmymoney4" + ."&query_format=3Dadvanced" + ; + + $types =3D array( + "all" =3D> "", + "changelog" =3D> "", + "wishlist" =3D> "&bug_severity=3Dwishlist", + "crash" =3D> "&bug_severity=3Dcrash", + "critical" =3D> "&bug_severity=3Dcritical", + "grave" =3D> "&bug_severity=3Dgrave", + "major" =3D> "&bug_severity=3Dmajor", + "normal" =3D> "&bug_severity=3Dnormal", + "minor" =3D> "&bug_severity=3Dminor", + "juniorjobs" =3D> "&keywords=3Djunior-jobs&keywords_type=3Dallwords", + "allbugs" =3D> "&bug_severity=3Dcrash&bug_severity=3Dmajor&bug_severity= =3Dnormal&bug_severity=3Dminor&bug_severity=3Dgrave&bug_severity=3Dcritical= ", + ); + + $versions =3D array( + "4.7" =3D> "&o2=3Dregexp&v2=3D4.7|4.7.[0-7]|4.6.[89][0-9]", + "4.7.0" =3D> "&o2=3Dregexp&v2=3D4.7.0", + "4.7.1" =3D> "&o2=3Dregexp&v2=3D4.7.1", + "4.7.2" =3D> "&o2=3Dregexp&v2=3D4.7.2", + "4.8" =3D> "&o2=3Dregexp&v2=3D4.8|4.8.[0-7]|4.7.[89][0-9]", + "4.8.0" =3D> "&o2=3Dregexp&v2=3D4.8.0", + "4.8.1" =3D> "&o2=3Dregexp&v2=3D4.8.1", + "5.0" =3D> "&o2=3Dregexp&v2=3D5.0|5.0.[0-7]|4.8.[89][0-9]", + "5.0.0" =3D> "&o2=3Dregexp&v2=3D5.0.0", + ); + + $search =3D array( + "open" =3D> "&f2=3Dversion".$versions[$version], + "fixed" =3D> "&f2=3Dcf_versionfixedin".$versions[$version], + "assigned" =3D> "&f2=3Dtarget_milestone".$versions[$version], + "todo" =3D> "&f2=3Dtarget_milestone".$versions[$version], + ); + + $orders =3D array( + "status" =3D> "&order=3Dbug_status%2Cpriority%2Cassigned_to%2Cbug_id", + "severity" =3D> "&order=3Dbug_severity%2Cbug_status%2Cpriority%2Cassigne= d_to%2Cbug_id", + "versionfixed" =3D> "&order=3Dcf_versionfixedin", + ); + $urls =3D array( + "wishlist" =3D> $url.$types[$type].$status['open'].$columns['open'].$ord= ers['status'], + "crash" =3D> $url.$types[$type].$status['open'].$columns['open'].$orders= ['status'], + "major" =3D> $url.$types[$type].$status['open'].$columns['open'].$orders= ['status'], + "normal" =3D> $url.$types[$type].$status['open'].$columns['open'].$order= s['status'], + "minor" =3D> $url.$types[$type].$status['open'].$columns['open'].$orders= ['status'], + "juniorjobs" =3D> $url.$types[$type].$status['open'].$columns['open'].$o= rders['status'], + "changelog" =3D> $url.$types['changelog'].$status['resolved'].$columns['= resolved'].$search['fixed'].$orders['versionfixed'], + "openbugs" =3D> $url.$types['allbugs'].$status['open'].$columns['open'].= $search['open'].$orders['status'], + "resolvedbugs" =3D> $url.$types['allbugs'].$status['resolved'].$columns[= 'resolved'].$search['fixed'].$orders['status'], + "resolvedcrashbugs" =3D> $url.$types['crash'].$status['resolved'].$colum= ns['resolved'].$search['fixed'].$orders['status'], + "resolvedmajorbugs" =3D> $url.$types['major'].$status['resolved'].$colum= ns['resolved'].$search['fixed'].$orders['status'], + "resolvednormalbugs" =3D> $url.$types['normal'].$status['resolved'].$col= umns['resolved'].$search['fixed'].$orders['status'], + "resolvedminorbugs" =3D> $url.$types['minor'].$status['resolved'].$colum= ns['resolved'].$search['fixed'].$orders['status'], + "resolvedfeatures" =3D> $url.$types['wishlist'].$status['resolved'].$col= umns['resolved'].$search['fixed'].$orders['status'], + "assignedfeatures" =3D> $url.$types['wishlist'].$status['assigned'].$col= umns['assigned'].$search['assigned'].$orders['status'], + "todofeatures" =3D> $url.$types['wishlist'].$status['todo'].$columns['to= do'].$search['todo'].$orders['status'], + ); + = + $url =3D ""; + if (isset($urls[$type])) { + $url =3D $urls[$type]; + if ($options) + $url .=3D "&". $options; + } + return $url; +} \ No newline at end of file diff --git a/openbugs.php b/openbugs.php new file mode 100644 index 0000000..a9b38ac --- /dev/null +++ b/openbugs.php @@ -0,0 +1,16 @@ + +# +# redirect to bugs.kde.org and shows a list of open bugs +# +# syntax: +# openbugsbugs.php - shows all open bugs +# openbugs.php? - shows bugs of e.g. 4.8.1 or 4.8 +# for all releases of the mentioned branch +# + include(dirname(__FILE__)."/lib.inc"); + $version =3D isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] := ""; + $url =3D buglist('openbugs',$version); + Header("Location: $url"); +?> \ No newline at end of file diff --git a/resolvedbugs.php b/resolvedbugs.php new file mode 100644 index 0000000..b6616a7 --- /dev/null +++ b/resolvedbugs.php @@ -0,0 +1,16 @@ + +# +# redirect to bugs.kde.org and shows a list of resolved bugs +# +# syntax: +# resolvedbugs.php - shows all resolved bugs +# resolvedbugs.php? - shows resolved bugs of e.g. 4.8= .1 +# or 4.8 for alll releases of the mentioned= branch +# + include(dirname(__FILE__)."/lib.inc"); + $version =3D isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] := ""; + $url =3D buglist('resolvedbugs',$version); + Header("Location: $url"); +?> \ No newline at end of file