*** Quits: daryn (~daryn@h127.64.29.71.dynamic.ip.windstream.net) (Quit: Ex-Chat) | 00:40 | |
*** Joins: dhx1 (~anonymous@60-242-108-164.static.tpgi.com.au) | 01:07 | |
*** Joins: soustruh (~Miranda@80.212.broadband11.iol.cz) | 04:36 | |
*** Joins: soc42 (~soc42@f051067129.adsl.alicedsl.de) | 06:18 | |
*** Joins: paulr_ (~IceChat09@2001:470:9310:aaaa:e845:452b:6da6:323f) | 06:37 | |
dhx1 | paulr_: :) | 06:38 |
---|---|---|
paulr_ | has john done any commits in alst 24 hours | 06:39 |
*** Joins: asm89 (~asm89@dhcp-077-251-157-210.chello.nl) | 07:03 | |
*** Quits: asm89 (~asm89@dhcp-077-251-157-210.chello.nl) (Quit: bye!) | 07:12 | |
*** Joins: daniel (~daniel@bzq-218-17-113.cablep.bezeqint.net) | 07:12 | |
daniel | Hey guys. We are using Mantis at work as a task manager. We use the due date field quiet alot to set deadlines for tasks. What I am working on is adding a new field to the view bug table that will show how much time is left until the dead line. How would I go on such a task? a custom function? a plugin? | 07:23 |
*** Quits: soc42 (~soc42@f051067129.adsl.alicedsl.de) (Remote host closed the connection) | 07:26 | |
daniel | anyone? | 08:00 |
paulr_ | why would that need a field | 08:35 |
paulr_ | surtely that's calcualte from the deadline [duedate] | 08:35 |
daniel | yeah, it's not an actual field saved in the data base. Rather just a column in the bugs table. | 09:42 |
daniel | My question is more how I implement this feature without losing it upon upgrading versions. | 09:43 |
daniel | because I can obviously implement it in view_all_inc.php in the write_bug_rows function | 09:44 |
paulr_ | take a look at custom functions i think | 09:44 |
jreese | daniel: you could do that as a plugin as well, there are hooks for defining new columns | 09:46 |
jreese | I know the code is complicated, but if you want an example of how it's done, look at http://git.mantisforge.org/w/product-matrix.git | 09:48 |
daniel | I am not familiar with Git since we use SVN. How do I view the code? | 09:52 |
jreese | http://git.mantisforge.org/w/product-matrix.git?a=tree;h=refs/heads/master;hb=master | 09:52 |
daniel | Can you be a bit more specific about where it's actually done? | 09:58 |
daniel | ProductMatrix.ColumnAPI.php is it the PVMStatusColumn::display | 10:08 |
jreese | daniel: I forgot that the code is really complicated because its creating and forcing columns at runtime | 10:16 |
jreese | It might be easier to just look at the developer docs | 10:16 |
daniel | yeah I'll admit i found it a bit complex especially not knowing what's it meant to do | 10:17 |
jreese | daniel: http://docs.mantisbt.org/master-1.2.x/en/developers/dev.eventref.filter.html#DEV.EVENTREF.FILTER.CUSTOM | 10:17 |
jreese | And http://docs.mantisbt.org/master-1.2.x/en/developers/dev.plugins.html if you need basic info on how to create a new plugin | 10:18 |
daniel | well to be honest I still don't get the whole concept of how hooks and events work. | 10:20 |
jreese | That's also covered in the developer docs | 10:20 |
daniel | but that's obviously beyond the scope of an irc chat | 10:21 |
daniel | so say I create a plugin class ExamplePlugin extends MantisPlugin { | 10:25 |
daniel | ... | 10:25 |
daniel | function hooks() { | 10:25 |
daniel | return array( | 10:25 |
daniel | 'EVENT_EXAMPLE_FOO' => 'foo', | 10:25 |
daniel | 'EVENT_EXAMPLE_BAR' => 'bar', | 10:25 |
daniel | ); | 10:25 |
daniel | } | 10:25 |
daniel | instead of EVENT_EXAMPLE_FOO => 'foo' I'll have EVENT_FILTER_FIELDS | 10:25 |
daniel | EVENT_FILTER_FIELDS => 'time_left' and then a function time_left(); | 10:26 |
jreese | Right | 10:27 |
*** Quits: daniel (~daniel@bzq-218-17-113.cablep.bezeqint.net) (Quit: Leaving) | 10:28 | |
*** Joins: daniel (~daniel@bzq-218-17-113.cablep.bezeqint.net) | 10:28 | |
daniel | that beggs the question. What about parameters? what do I actually return? | 10:29 |
daniel | do I expect certain data to be passed to my time_left function? | 10:30 |
jreese | That should be covered in the event reference | 10:34 |
daniel | <Array>: Array of class names for custom columns. So i need to create a class for the new column ? It sounds too complex | 10:36 |
jreese | Yeah, you would need to subclass mantiscolumn to cover all the behavior | 10:40 |
*** Quits: soustruh (~Miranda@80.212.broadband11.iol.cz) (Quit: visit http://wormscesky.cz) | 10:52 | |
daniel | in which file do I define the subclass for mantiscolumn? in the main plugin file(timeleft.php) | 11:04 |
daniel | ? | 11:04 |
jreese | Wherever you want, as long as it gets included by your plugin | 11:11 |
daniel | jreese and | 11:13 |
daniel | whoops sorry. What methods do I define in the class? | 11:14 |
jreese | You should be fine overriding the existing methods from mantiscolumn | 11:14 |
daniel | Can't get it to work. http://pastie.org/2125013 | 11:30 |
daniel | alright. I got it... I | 11:52 |
jreese | A) make sure the file is named MagnetTimeLeft.php and plugins/MagnetTimeLeft/ and b) make sure you go to manage plugins page and that you can see ans install the olugin, and then c) you need to modify either your own preferences or the global prefs to enable that column | 11:53 |
jreese | Lol, time delay on my connection | 11:53 |
daniel | :) | 11:55 |
daniel | What do I do if I want to style the cell ? just echo span style... | 11:59 |
jreese | Yep | 12:00 |
daniel | and If I want to actually style the TD | 12:00 |
daniel | btw jreese. Thanks so much for your patience! | 12:01 |
jreese | That's currently unsupported I believe, although you could always use JavaScript to do that | 12:01 |
jreese | You're welcome | 12:01 |
daniel | give the span a class and use a parent selector | 12:01 |
jreese | Basically | 12:02 |
daniel | And what if I wanted to add it to the view issue details | 12:15 |
daniel | jreese? | 12:18 |
jreese | There are a couple bug view hooks that you can return some HTML to output | 12:21 |
*** Joins: tmckeown (~Adium@pool-108-56-179-231.washdc.fios.verizon.net) | 13:33 | |
*** Parts: tmckeown (~Adium@pool-108-56-179-231.washdc.fios.verizon.net) () | 13:33 | |
*** Joins: daryn (~daryn@h127.64.29.71.dynamic.ip.windstream.net) | 13:40 | |
*** Joins: tmckeown (~Adium@pool-108-56-179-231.washdc.fios.verizon.net) | 14:17 | |
*** Quits: tmckeown (~Adium@pool-108-56-179-231.washdc.fios.verizon.net) (Client Quit) | 14:21 | |
*** Quits: paulr_ (~IceChat09@2001:470:9310:aaaa:e845:452b:6da6:323f) (Ping timeout: 260 seconds) | 14:21 | |
*** Joins: asm89 (~asm89@dhcp-077-251-157-210.chello.nl) | 14:49 | |
*** Quits: asm89 (~asm89@dhcp-077-251-157-210.chello.nl) (Client Quit) | 14:54 | |
*** Joins: soustruh (~Miranda@ip-86-49-121-75.net.upcbroadband.cz) | 15:23 | |
*** Joins: tmckeown (~Adium@pool-108-56-179-231.washdc.fios.verizon.net) | 15:56 | |
*** Parts: tmckeown (~Adium@pool-108-56-179-231.washdc.fios.verizon.net) () | 15:56 | |
*** Joins: paulr_ (~IceChat09@2001:470:9310:aaaa:4863:868e:d6c0:faab) | 16:37 | |
*** Quits: micahg (~micahg@ubuntu/member/micahg) (Read error: Connection reset by peer) | 16:38 | |
*** Joins: paulr (~IceChat09@2001:470:9310:aaaa:4863:868e:d6c0:faab) | 16:46 | |
*** Quits: paulr (~IceChat09@2001:470:9310:aaaa:4863:868e:d6c0:faab) (Client Quit) | 16:46 | |
*** Quits: chris38 (~chris38@AGrenoble-751-1-24-43.w86-206.abo.wanadoo.fr) (Ping timeout: 252 seconds) | 16:50 | |
*** Joins: chris38 (~chris38@AGrenoble-751-1-23-220.w86-206.abo.wanadoo.fr) | 16:55 | |
*** Joins: snorkel_c (~snorkel@24.224.96.187) | 17:09 | |
*** Quits: snorkel_c (~snorkel@24.224.96.187) (Remote host closed the connection) | 17:09 | |
*** Joins: tmckeown (~Adium@pool-108-56-179-231.washdc.fios.verizon.net) | 17:58 | |
*** Parts: tmckeown (~Adium@pool-108-56-179-231.washdc.fios.verizon.net) () | 17:58 | |
*** Joins: daryn_ (~daryn@h29.9.96.216.dynamic.ip.windstream.net) | 18:17 | |
*** Quits: daryn (~daryn@h127.64.29.71.dynamic.ip.windstream.net) (Ping timeout: 240 seconds) | 18:20 | |
*** Joins: tmckeown (~Adium@pool-108-56-179-231.washdc.fios.verizon.net) | 18:26 | |
*** Parts: tmckeown (~Adium@pool-108-56-179-231.washdc.fios.verizon.net) () | 18:26 | |
*** Quits: soustruh (~Miranda@ip-86-49-121-75.net.upcbroadband.cz) (Quit: visit http://wormscesky.cz) | 19:16 | |
*** Quits: paulr_ (~IceChat09@2001:470:9310:aaaa:4863:868e:d6c0:faab) (Quit: Give a man a fish and he will eat for a day. Teach him how to fish, and he will sit in a boat and drink beer all day) | 19:23 | |
*** Joins: daryn__ (~daryn@h234.216.31.71.dynamic.ip.windstream.net) | 19:23 | |
*** Quits: daryn_ (~daryn@h29.9.96.216.dynamic.ip.windstream.net) (Ping timeout: 264 seconds) | 19:26 | |
*** Quits: scribe9343423 (~scribe934@static.96.23.63.178.clients.your-server.de) (Remote host closed the connection) | 20:00 | |
*** Joins: scribe9343423 (~scribe934@static.96.23.63.178.clients.your-server.de) | 20:00 | |
*** Joins: daryn_ (~daryn@h39.222.31.71.dynamic.ip.windstream.net) | 20:05 | |
*** Quits: daryn__ (~daryn@h234.216.31.71.dynamic.ip.windstream.net) (Ping timeout: 276 seconds) | 20:09 | |
*** Joins: Cesare (~Adium@creati59.lnk.telstra.net) | 20:21 | |
*** daryn_ is now known as daryn | 21:02 | |
*** Joins: [GM]Honki (~GMHonki@port-92-204-63-140.dynamic.qsc.de) | 21:32 | |
[GM]Honki | Hello | 21:32 |
*** [GM]Honki is now known as Honki | 21:33 | |
Honki | Are there somebody who is able to answer me a question? ^^ | 21:33 |
Honki | ^^ | 21:34 |
Honki | 20 persons online and no one awake? ^^ | 21:36 |
*** Joins: tmckeown (~Adium@pool-108-56-179-231.washdc.fios.verizon.net) | 21:36 | |
Honki | hiho | 21:37 |
*** Parts: tmckeown (~Adium@pool-108-56-179-231.washdc.fios.verizon.net) () | 21:37 | |
*** Quits: Honki (~GMHonki@port-92-204-63-140.dynamic.qsc.de) () | 21:38 | |
*** Joins: [GM]Honki (~GMHonki@port-92-204-63-140.dynamic.qsc.de) | 21:38 | |
*** Quits: [GM]Honki (~GMHonki@port-92-204-63-140.dynamic.qsc.de) (Client Quit) | 21:38 | |
Cesare | hi | 21:49 |
*** Quits: daryn (~daryn@h39.222.31.71.dynamic.ip.windstream.net) (Quit: Ex-Chat) | 22:48 |
Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!