Menu

User input Ref for a ticket

mjp123
2015-08-17
2015-08-17
  • mjp123

    mjp123 - 2015-08-17

    Hi,

    I am trying to allow a user to input the ticket ref. I have modified the field so that the user can input a value during the creation stage, but when it is saved, the value is overwritten with the next generated reference (based on the database id from what I can determine)

    I have tried overriding methods as follows, but with no success.

    1) Override "MakeTicketTRef" to return no value, but that just creates a ticket without a ref.
    2) Override "DBInsetNoReload" and not set the ref at all. The problem here is that the value is still set as the method calls parent::DBInsertNoReload(). If I remove this line then I get a system error.

    So my question, is there a way to achieve this via extensions withlut having to modify the main system code?

    Thank you for any help tha you can provide.

    Matt

     
  • dlp

    dlp - 2015-08-17

    I think this is a bad idea to override the ticket ref.
    Yes, It is based on a database id, this is why I think it is a bad idea.

    For what reason do you want to do this?

    A better solution could be to add a new field.

     
  • mjp123

    mjp123 - 2015-08-17

    I agree but I am being driven by the business!

    I have added a new field, then on creation I perform a duplicate check and update the ref field. Hopefully this will satisfy them.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.